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: 68b442714a
This commit is contained in:
Aliaksey Kandratsenka 2023-07-17 19:31:06 +00:00
parent 46d3315ad7
commit e0f4c0e6fb

View File

@ -93,14 +93,9 @@ void CentralFreeList::ReleaseListToSpans(void* start) {
}
}
Span* MapObjectToSpan(void* object) {
void CentralFreeList::ReleaseToSpans(void* object) {
const PageID p = reinterpret_cast<uintptr_t>(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);