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

Unified Diff: src/spaces-inl.h

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
« src/spaces.cc ('K') | « src/spaces.cc ('k') | src/store-buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces-inl.h
===================================================================
--- src/spaces-inl.h (revision 10407)
+++ src/spaces-inl.h (working copy)
@@ -164,12 +164,12 @@
Executability executable,
PagedSpace* owner) {
Page* page = reinterpret_cast<Page*>(chunk);
- ASSERT(chunk->size() == static_cast<size_t>(kPageSize));
+ ASSERT(chunk->size() <= kPageSize);
ASSERT(chunk->owner() == owner);
- owner->IncreaseCapacity(Page::kObjectAreaSize);
- owner->Free(page->ObjectAreaStart(),
- static_cast<int>(page->ObjectAreaEnd() -
- page->ObjectAreaStart()));
+ intptr_t object_bytes = page->ObjectAreaEnd() - page->ObjectAreaStart();
+ owner->IncreaseCapacity(object_bytes);
+ owner->AddToFreeLists(page->ObjectAreaStart(),
+ static_cast<int>(object_bytes));
heap->incremental_marking()->SetOldSpacePageFlags(chunk);
@@ -257,6 +257,7 @@
if (new_top > allocation_info_.limit) return NULL;
allocation_info_.top = new_top;
+ ASSERT(new_top >= Page::FromAddress(new_top - 1)->ObjectAreaStart());
Vyacheslav Egorov (Chromium) 2012/01/16 17:02:54 FromAllocationTop instead of FromAddress
Erik Corry 2012/01/17 11:37:22 Done.
return HeapObject::FromAddress(current_top);
}
« src/spaces.cc ('K') | « src/spaces.cc ('k') | src/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698