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

Unified Diff: third_party/WebKit/Source/platform/heap/PageMemory.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: Refactored Created 4 years, 11 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/PageMemory.h
diff --git a/third_party/WebKit/Source/platform/heap/PageMemory.h b/third_party/WebKit/Source/platform/heap/PageMemory.h
index 51cfe9adfd0a5144f4a0d83127fbb31728c9a1c7..7c53bf307d1e6bdc52ecc17d511a4856fa92ce60 100644
--- a/third_party/WebKit/Source/platform/heap/PageMemory.h
+++ b/third_party/WebKit/Source/platform/heap/PageMemory.h
@@ -75,14 +75,14 @@ public:
m_inUse[index(page)] = false;
}
- static PageMemoryRegion* allocateLargePage(size_t size)
+ static PageMemoryRegion* allocateLargePage(size_t size, GCGroup* gcGroup)
{
- return allocate(size, 1);
+ return allocate(size, 1, gcGroup);
}
- static PageMemoryRegion* allocateNormalPages()
+ static PageMemoryRegion* allocateNormalPages(GCGroup* gcGroup)
{
- return allocate(blinkPageSize * blinkPagesPerRegion, blinkPagesPerRegion);
+ return allocate(blinkPageSize * blinkPagesPerRegion, blinkPagesPerRegion, gcGroup);
}
BasePage* pageFromAddress(Address address)
@@ -96,7 +96,7 @@ public:
}
private:
- PageMemoryRegion(Address base, size_t, unsigned numPages);
+ PageMemoryRegion(Address base, size_t, unsigned numPages, GCGroup*);
unsigned index(Address address)
{
@@ -108,11 +108,12 @@ private:
return offset / blinkPageSize;
}
- static PageMemoryRegion* allocate(size_t, unsigned numPages);
+ static PageMemoryRegion* allocate(size_t, unsigned numPages, GCGroup*);
bool m_isLargePage;
bool m_inUse[blinkPagesPerRegion];
unsigned m_numPages;
+ GCGroup* m_gcGroup;
};
// A RegionTree is a simple binary search tree of PageMemoryRegions sorted
@@ -140,8 +141,6 @@ private:
PageMemoryRegion* m_region;
RegionTree* m_left;
RegionTree* m_right;
-
- static RegionTree* s_regionTree;
};
// Representation of the memory used for a Blink heap page.
@@ -195,7 +194,7 @@ public:
//
// The returned page memory region will be zeroed.
//
- static PageMemory* allocate(size_t payloadSize);
+ static PageMemory* allocate(size_t payloadSize, GCGroup*);
private:
PageMemory(PageMemoryRegion* reserved, const MemoryRegion& writable);

Powered by Google App Engine
This is Rietveld 408576698