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

Unified Diff: src/heap/spaces.cc

Issue 932823002: Limit size of first page based on serialized data. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove printf debugging Created 5 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 | « src/full-codegen.h ('k') | src/serialize.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/full-codegen.h ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698