mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-24 08:03:32 +03:00
Apply likely()/unlikely() to allocation/deallocation fast paths.
This commit is contained in:
parent
91566fc079
commit
9c640bfdd4
8 changed files with 138 additions and 129 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue