Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1056)

Unified Diff: third_party/WebKit/Source/platform/heap/HeapAllocator.cpp

Issue 1754183002: Rename BaseHeap to BaseArena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp b/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
index 45f1d04f64a6879d14a4881c50357340af735ea7..734aaa4ea70743cf7ec1f174af36012862939e2f 100644
--- a/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
@@ -19,12 +19,12 @@ void HeapAllocator::backingFree(void* address)
// Don't promptly free large objects because their page is never reused.
// Don't free backings allocated on other threads.
BasePage* page = pageFromObject(address);
- if (page->isLargeObjectPage() || page->heap()->threadState() != state)
+ if (page->isLargeObjectPage() || page->arena()->threadState() != state)
return;
HeapObjectHeader* header = HeapObjectHeader::fromPayload(address);
ASSERT(header->checkHeader());
- NormalPageHeap* heap = static_cast<NormalPage*>(page)->heapForNormalPage();
+ NormalPageHeap* heap = static_cast<NormalPage*>(page)->arenaForNormalPage();
state->promptlyFreed(header->gcInfoIndex());
heap->promptlyFreeObject(header);
}
@@ -58,15 +58,15 @@ bool HeapAllocator::backingExpand(void* address, size_t newSize)
// FIXME: Support expand for large objects.
// Don't expand backings allocated on other threads.
BasePage* page = pageFromObject(address);
- if (page->isLargeObjectPage() || page->heap()->threadState() != state)
+ if (page->isLargeObjectPage() || page->arena()->threadState() != state)
return false;
HeapObjectHeader* header = HeapObjectHeader::fromPayload(address);
ASSERT(header->checkHeader());
- NormalPageHeap* heap = static_cast<NormalPage*>(page)->heapForNormalPage();
+ NormalPageHeap* heap = static_cast<NormalPage*>(page)->arenaForNormalPage();
bool succeed = heap->expandObject(header, newSize);
if (succeed)
- state->allocationPointAdjusted(heap->heapIndex());
+ state->allocationPointAdjusted(heap->arenaIndex());
return succeed;
}
@@ -101,12 +101,12 @@ bool HeapAllocator::backingShrink(void* address, size_t quantizedCurrentSize, si
// FIXME: Support shrink for large objects.
// Don't shrink backings allocated on other threads.
BasePage* page = pageFromObject(address);
- if (page->isLargeObjectPage() || page->heap()->threadState() != state)
+ if (page->isLargeObjectPage() || page->arena()->threadState() != state)
return false;
HeapObjectHeader* header = HeapObjectHeader::fromPayload(address);
ASSERT(header->checkHeader());
- NormalPageHeap* heap = static_cast<NormalPage*>(page)->heapForNormalPage();
+ NormalPageHeap* heap = static_cast<NormalPage*>(page)->arenaForNormalPage();
// We shrink the object only if the shrinking will make a non-small
// prompt-free block.
// FIXME: Optimize the threshold size.
@@ -115,7 +115,7 @@ bool HeapAllocator::backingShrink(void* address, size_t quantizedCurrentSize, si
bool succeededAtAllocationPoint = heap->shrinkObject(header, quantizedShrunkSize);
if (succeededAtAllocationPoint)
- state->allocationPointAdjusted(heap->heapIndex());
+ state->allocationPointAdjusted(heap->arenaIndex());
return true;
}
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapAllocator.h ('k') | third_party/WebKit/Source/platform/heap/HeapPage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698