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

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

Issue 1748363005: Use a bitmap to record PageMemoryRegion usage. (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
« no previous file with comments | « third_party/WebKit/Source/platform/heap/PageMemory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/PageMemory.cpp
diff --git a/third_party/WebKit/Source/platform/heap/PageMemory.cpp b/third_party/WebKit/Source/platform/heap/PageMemory.cpp
index 5efe1fcede7eb3036afbf20179a5dcfb76e7911d..9ed5666386fb677593f48f6db6f8b24707730876 100644
--- a/third_party/WebKit/Source/platform/heap/PageMemory.cpp
+++ b/third_party/WebKit/Source/platform/heap/PageMemory.cpp
@@ -31,11 +31,11 @@ void MemoryRegion::decommit()
PageMemoryRegion::PageMemoryRegion(Address base, size_t size, unsigned numPages)
: MemoryRegion(base, size)
, m_isLargePage(numPages == 1)
+ , m_inUseBitmap(0)
, m_numPages(numPages)
{
+ static_assert(blinkPagesPerRegion < 8 * sizeof(unsigned), "PageMemoryRegion's in-use bitmap must fit within a word.");
Heap::addPageMemoryRegion(this);
- for (size_t i = 0; i < blinkPagesPerRegion; ++i)
- m_inUse[i] = false;
}
PageMemoryRegion::~PageMemoryRegion()
« no previous file with comments | « third_party/WebKit/Source/platform/heap/PageMemory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698