From d59e30cbc9fa47425a4ba907ab8f8b580e26f37e Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Wed, 24 May 2023 14:13:28 +0200 Subject: [PATCH] Rename fallback_impl to fallbackNewImpl and prune in jeprof The existing fallback_impl name seemed a bit generic and given it's static probably okay to rename. Closes #2451 --- bin/jeprof.in | 2 ++ src/jemalloc_cpp.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/jeprof.in b/bin/jeprof.in index dbf6252b..b734f50b 100644 --- a/bin/jeprof.in +++ b/bin/jeprof.in @@ -2957,6 +2957,8 @@ sub RemoveUninterestingFrames { '@JEMALLOC_PREFIX@malloc', 'newImpl', 'void* newImpl', + 'fallbackNewImpl', + 'void* fallbackNewImpl', '@JEMALLOC_PREFIX@free', '@JEMALLOC_PREFIX@memalign', '@JEMALLOC_PREFIX@posix_memalign', diff --git a/src/jemalloc_cpp.cpp b/src/jemalloc_cpp.cpp index e39615bc..4258b1ad 100644 --- a/src/jemalloc_cpp.cpp +++ b/src/jemalloc_cpp.cpp @@ -100,7 +100,7 @@ handleOOM(std::size_t size, bool nothrow) { template JEMALLOC_NOINLINE static void * -fallback_impl(std::size_t size) noexcept(IsNoExcept) { +fallbackNewImpl(std::size_t size) noexcept(IsNoExcept) { void *ptr = malloc_default(size); if (likely(ptr != nullptr)) { return ptr; @@ -112,7 +112,7 @@ template JEMALLOC_ALWAYS_INLINE void * newImpl(std::size_t size) noexcept(IsNoExcept) { - return imalloc_fastpath(size, &fallback_impl); + return imalloc_fastpath(size, &fallbackNewImpl); } void *