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

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

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps 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.h
diff --git a/third_party/WebKit/Source/platform/heap/HeapAllocator.h b/third_party/WebKit/Source/platform/heap/HeapAllocator.h
index c5bf93760a821ef77cf19528bfcdca261c01b98e..d099c7de79f0b15327661ead8a2d496fff9fdc67 100644
--- a/third_party/WebKit/Source/platform/heap/HeapAllocator.h
+++ b/third_party/WebKit/Source/platform/heap/HeapAllocator.h
@@ -42,7 +42,7 @@ public:
ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state();
ASSERT(state->isAllocationAllowed());
size_t gcInfoIndex = GCInfoTrait<HeapVectorBacking<T, VectorTraits<T>>>::index();
- NormalPageHeap* heap = static_cast<NormalPageHeap*>(state->vectorBackingHeap(gcInfoIndex));
+ NormalPageArena* heap = static_cast<NormalPageArena*>(state->vectorBackingArena(gcInfoIndex));
return reinterpret_cast<T*>(heap->allocateObject(Heap::allocationSizeFromSize(size), gcInfoIndex));
}
template <typename T>
@@ -51,7 +51,7 @@ public:
ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state();
ASSERT(state->isAllocationAllowed());
size_t gcInfoIndex = GCInfoTrait<HeapVectorBacking<T, VectorTraits<T>>>::index();
- NormalPageHeap* heap = static_cast<NormalPageHeap*>(state->expandedVectorBackingHeap(gcInfoIndex));
+ NormalPageArena* heap = static_cast<NormalPageArena*>(state->expandedVectorBackingArena(gcInfoIndex));
return reinterpret_cast<T*>(heap->allocateObject(Heap::allocationSizeFromSize(size), gcInfoIndex));
}
static void freeVectorBacking(void*);
@@ -62,7 +62,7 @@ public:
{
size_t gcInfoIndex = GCInfoTrait<HeapVectorBacking<T, VectorTraits<T>>>::index();
ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state();
- return reinterpret_cast<T*>(Heap::allocateOnHeapIndex(state, size, BlinkGC::InlineVectorHeapIndex, gcInfoIndex));
+ return reinterpret_cast<T*>(Heap::allocateOnArenaIndex(state, size, BlinkGC::InlineVectorArenaIndex, gcInfoIndex));
}
static void freeInlineVectorBacking(void*);
static bool expandInlineVectorBacking(void*, size_t);
@@ -73,7 +73,7 @@ public:
{
size_t gcInfoIndex = GCInfoTrait<HeapHashTableBacking<HashTable>>::index();
ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state();
- return reinterpret_cast<T*>(Heap::allocateOnHeapIndex(state, size, BlinkGC::HashTableHeapIndex, gcInfoIndex));
+ return reinterpret_cast<T*>(Heap::allocateOnArenaIndex(state, size, BlinkGC::HashTableArenaIndex, gcInfoIndex));
}
template <typename T, typename HashTable>
static T* allocateZeroedHashTableBacking(size_t size)

Powered by Google App Engine
This is Rietveld 408576698