Apply likely()/unlikely() to allocation/deallocation fast paths.
This commit is contained in:
@@ -814,7 +814,7 @@ JEMALLOC_ALWAYS_INLINE void
|
||||
iqalloc(void *ptr, bool try_tcache)
|
||||
{
|
||||
|
||||
if (config_fill && opt_quarantine)
|
||||
if (config_fill && unlikely(opt_quarantine))
|
||||
quarantine(ptr);
|
||||
else
|
||||
idalloct(ptr, try_tcache);
|
||||
@@ -824,7 +824,7 @@ JEMALLOC_ALWAYS_INLINE void
|
||||
isqalloc(void *ptr, size_t size, bool try_tcache)
|
||||
{
|
||||
|
||||
if (config_fill && opt_quarantine)
|
||||
if (config_fill && unlikely(opt_quarantine))
|
||||
quarantine(ptr);
|
||||
else
|
||||
isdalloct(ptr, size, try_tcache);
|
||||
|
Reference in New Issue
Block a user