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

Unified Diff: src/spaces.cc

Issue 7144015: Change age-mark to not expect pages to be in increasing order. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 6 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/heap-inl.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 2671ce9e6ed90f120554987840c613f4b2a37ba3..40a981d226f355c4d00dac772a53f4cc0f43d7b8 100644
--- a/src/spaces.cc
+++ b/src/spaces.cc
@@ -1279,6 +1279,7 @@ void SemiSpace::FlipPages(intptr_t flags, intptr_t mask) {
if (becomes_to_space) {
page->ClearFlag(MemoryChunk::IN_FROM_SPACE);
page->SetFlag(MemoryChunk::IN_TO_SPACE);
+ page->ClearFlag(MemoryChunk::NEW_SPACE_BELOW_AGE_MARK);
} else {
page->SetFlag(MemoryChunk::IN_FROM_SPACE);
page->ClearFlag(MemoryChunk::IN_TO_SPACE);
@@ -1590,6 +1591,16 @@ void NewSpace::RecordPromotion(HeapObject* obj) {
#endif // defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING)
+void SemiSpace::set_age_mark(Address mark) {
+ age_mark_ = mark;
+ ASSERT(to_space_.Contains(mark));
+ // Mark all pages up to the one containing mark.
+ NewSpacePageIterator it(space_low(), mark);
+ while (it.has_next()) {
+ it.next()->SetFlag(MemoryChunk::NEW_SPACE_BELOW_AGE_MARK);
+ }
+}
+
// -----------------------------------------------------------------------------
// Free lists for old object spaces implementation
« src/heap-inl.h ('K') | « src/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698