From 23b3e35d6e125f2cbc8ef9db0297de08c9ba2324 Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Tue, 9 Jul 2019 13:14:17 +0100 Subject: [PATCH] Add comment about inlining choices. --- src/mem/alloc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mem/alloc.h b/src/mem/alloc.h index fa691ba..66f4091 100644 --- a/src/mem/alloc.h +++ b/src/mem/alloc.h @@ -1370,6 +1370,10 @@ namespace snmalloc large_allocator.dealloc(slab, large_class); } + // Note that this is on the slow path as it lead to better code. + // As it is tail, not inlining means that it is jumped to, so has no perf + // impact on the producer consumer scenarios, and doesn't require register + // spills in the fast path for local deallocation. SNMALLOC_SLOW_PATH void remote_dealloc(RemoteAllocator* target, void* p, sizeclass_t sizeclass) {