From e0f4c0e6fb402e56e82a82438561f413090f0ac8 Mon Sep 17 00:00:00 2001 From: Aliaksey Kandratsenka Date: Mon, 17 Jul 2023 19:31:06 +0000 Subject: [PATCH] manually inline MapObjectToSpan into ReleaseToSpans It was originally separated into own function due to some (now obsolete) compiler optimization bug. We stopped worked around that bug few commits ago. But as github user plopresti rightfully pointed out (much, much thanks!), we lost `static' on that function. But since it is trivial function and used exactly once, it is best to simply inline it's 2 lines of code back instead of returning static. Previous commit was: 68b442714a86060d1dd95de4c515cc7774e3751e --- src/central_freelist.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/central_freelist.cc b/src/central_freelist.cc index 9e11c51..f0eef4e 100644 --- a/src/central_freelist.cc +++ b/src/central_freelist.cc @@ -93,14 +93,9 @@ void CentralFreeList::ReleaseListToSpans(void* start) { } } -Span* MapObjectToSpan(void* object) { +void CentralFreeList::ReleaseToSpans(void* object) { const PageID p = reinterpret_cast(object) >> kPageShift; Span* span = Static::pageheap()->GetDescriptor(p); - return span; -} - -void CentralFreeList::ReleaseToSpans(void* object) { - Span* span = MapObjectToSpan(object); ASSERT(span != NULL); ASSERT(span->refcount > 0);