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

Unified Diff: src/spaces.cc

Issue 7058009: Make InToSpace/InFromSpace use the page header. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 7 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.h ('K') | « src/spaces.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.cc
diff --git a/src/spaces.cc b/src/spaces.cc
index 157458d4680d2064274f730026d76c5b9e269103..5e2c56f321cfe689d0cb9607b077c5b8b72446d5 100644
--- a/src/spaces.cc
+++ b/src/spaces.cc
@@ -391,7 +391,9 @@ void Page::InitializeAsAnchor(PagedSpace* owner) {
}
-NewSpacePage* NewSpacePage::Initialize(Heap* heap, Address start) {
+NewSpacePage* NewSpacePage::Initialize(Heap* heap,
+ Address start,
+ SemiSpaceId id) {
MemoryChunk* chunk = MemoryChunk::Initialize(heap,
start,
Page::kPageSize,
@@ -399,6 +401,11 @@ NewSpacePage* NewSpacePage::Initialize(Heap* heap, Address start) {
heap->new_space());
chunk->initialize_scan_on_scavenge(true);
chunk->SetFlag(MemoryChunk::IN_NEW_SPACE);
+ if (id == kSecondSemiSpace) {
+ chunk->SetFlag(MemoryChunk::SEMI_SPACE_TAG);
+ } else {
+ ASSERT(!chunk->IsFlagSet(MemoryChunk::SEMI_SPACE_TAG));
+ }
heap->incremental_marking()->SetNewSpacePageFlags(chunk);
return static_cast<NewSpacePage*>(chunk);
}
@@ -1035,7 +1042,7 @@ bool SemiSpace::Commit() {
committed_ = true;
// TODO(gc): When more than one page is present, initialize and
// chain them all.
- current_page_ = NewSpacePage::Initialize(heap(), start_);
+ current_page_ = NewSpacePage::Initialize(heap(), start_, id_);
return true;
}
« src/spaces.h ('K') | « src/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698