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..d5d4cdf26b0e238919640d10a2a5e7ef53fec043 100644 |
--- a/third_party/WebKit/Source/platform/heap/PageMemory.cpp |
+++ b/third_party/WebKit/Source/platform/heap/PageMemory.cpp |
@@ -6,6 +6,7 @@ |
#include "platform/heap/Heap.h" |
#include "wtf/Assertions.h" |
+#include "wtf/Atomics.h" |
#include "wtf/PageAllocator.h" |
namespace blink { |
@@ -44,6 +45,13 @@ PageMemoryRegion::~PageMemoryRegion() |
release(); |
} |
+void PageMemoryRegion::pageDeleted(Address page) |
+{ |
+ markPageUnused(page); |
+ if (!atomicDecrement(&m_numPages)) |
+ delete this; |
+} |
+ |
// TODO(haraken): Like partitionOutOfMemoryWithLotsOfUncommitedPages(), |
// we should probably have a way to distinguish physical memory OOM from |
// virtual address space OOM. |