mark huge allocations as unlikely

This cleans up the fast path a bit more by moving away more code.
This commit is contained in:
Daniel Micay
2014-10-23 10:30:52 -04:00
committed by Jason Evans
parent c93ed81cd0
commit 809b0ac391
4 changed files with 16 additions and 16 deletions

View File

@@ -361,7 +361,7 @@ prof_tctx_get(const void *ptr)
assert(ptr != NULL);
chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr);
if (chunk != ptr) {
if (likely(chunk != ptr)) {
/* Region. */
ret = arena_prof_tctx_get(ptr);
} else
@@ -379,7 +379,7 @@ prof_tctx_set(const void *ptr, prof_tctx_t *tctx)
assert(ptr != NULL);
chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr);
if (chunk != ptr) {
if (likely(chunk != ptr)) {
/* Region. */
arena_prof_tctx_set(ptr, tctx);
} else