mirror of
https://github.com/gperftools/gperftools
synced 2025-01-03 05:02:04 +00:00
speedup free code path by dropping "fast path allowed check"
This commit is contained in:
parent
10f7e20716
commit
464688ab6d
@ -1302,11 +1302,10 @@ ALWAYS_INLINE void do_free_helper(void* ptr,
|
||||
ALWAYS_INLINE void do_free_with_callback(void* ptr,
|
||||
void (*invalid_free_fn)(void*)) {
|
||||
ThreadCache* heap = NULL;
|
||||
if (LIKELY(ThreadCache::IsFastPathAllowed())) {
|
||||
heap = ThreadCache::GetCacheWhichMustBePresent();
|
||||
heap = ThreadCache::GetCacheIfPresent();
|
||||
if (LIKELY(heap)) {
|
||||
do_free_helper(ptr, invalid_free_fn, heap, true);
|
||||
} else {
|
||||
heap = ThreadCache::GetCacheIfPresent();
|
||||
do_free_helper(ptr, invalid_free_fn, heap, false);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user