mirror of
https://github.com/gperftools/gperftools
synced 2024-12-26 17:22:03 +00:00
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:
parent
46d3315ad7
commit
e0f4c0e6fb
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user