Index: src/heap/spaces.cc |
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc |
index 1219a7a74dbc58a3305168aaf69198b4b64665dc..c2ce5fcfafb28f830805e01d3b9fc3d5617c9daa 100644 |
--- a/src/heap/spaces.cc |
+++ b/src/heap/spaces.cc |
@@ -1038,6 +1038,10 @@ bool PagedSpace::Expand() { |
intptr_t size = AreaSize(); |
+ if (anchor_.next_page() == &anchor_) { |
+ size = Snapshot::SizeOfFirstPage(identity()); |
+ } |
+ |
Page* p = heap()->isolate()->memory_allocator()->AllocatePage(size, this, |
executable()); |
if (p == NULL) return false; |