From 9fd238d5faac5d90fd76e6017083a41fb2a92a04 Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Tue, 9 Jul 2019 10:52:52 +0100 Subject: [PATCH] Move remote dealloc to slow path It is only ever called in a tail position, so slow path means it is just a jump, but improves the local deallocation fast path's codegen considerably. --- src/mem/alloc.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/mem/alloc.h b/src/mem/alloc.h index c08ac2d..fa691ba 100644 --- a/src/mem/alloc.h +++ b/src/mem/alloc.h @@ -1370,15 +1370,8 @@ namespace snmalloc large_allocator.dealloc(slab, large_class); } -#if defined(__GNUC__) && !defined(__clang__) && !defined(__OPTIMIZE__) - // Don't force this to be always inlined in debug builds with GCC, because - // it will fail and then raise an error. - inline -#else - SNMALLOC_FAST_PATH -#endif - void - remote_dealloc(RemoteAllocator* target, void* p, sizeclass_t sizeclass) + SNMALLOC_SLOW_PATH + void remote_dealloc(RemoteAllocator* target, void* p, sizeclass_t sizeclass) { MEASURE_TIME(remote_dealloc, 4, 16); assert(target->id() != id());