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

Unified Diff: src/serialize.cc

Issue 9179012: Reduce boot-up memory use of V8. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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
« no previous file with comments | « src/platform-win32.cc ('k') | src/snapshot.h » ('j') | src/spaces.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.cc
===================================================================
--- src/serialize.cc (revision 10407)
+++ src/serialize.cc (working copy)
@@ -612,6 +612,7 @@
pages_[LO_SPACE].Add(address);
}
last_object_address_ = address;
+ ASSERT(address >= Page::FromAddress(address)->ObjectAreaStart());
return address;
}
@@ -622,7 +623,12 @@
int offset = source_->GetInt();
ASSERT(!SpaceIsLarge(space));
offset <<= kObjectAlignmentBits;
- return HeapObject::FromAddress(high_water_[space] - offset);
+ Address address = high_water_[space] - offset;
+ // This assert will fail if kMinimumSpaceSizes is too small for a space,
+ // because we rely on the fact that all allocation is linear when the VM
+ // is very young.
+ ASSERT(address >= Page::FromAddress(address)->ObjectAreaStart());
+ return HeapObject::FromAddress(address);
}
« no previous file with comments | « src/platform-win32.cc ('k') | src/snapshot.h » ('j') | src/spaces.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698