Apply likely()/unlikely() to allocation/deallocation fast paths.

This commit is contained in:
Jason Evans
2014-09-11 16:20:44 -07:00
parent 91566fc079
commit 9c640bfdd4
8 changed files with 138 additions and 129 deletions

View File

@@ -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);