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

Unified Diff: src/heap-inl.h

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
« no previous file with comments | « no previous file | src/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-inl.h
diff --git a/src/heap-inl.h b/src/heap-inl.h
index d35dabcb2084c6b56ca41f81f3f6ebe680794931..7cf0f4ad3f950078594dfc536227a8173ffcf10b 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -302,7 +302,11 @@ bool Heap::ShouldBePromoted(Address old_address, int object_size) {
// - the object has survived a scavenge operation or
// - to space is already 25% full.
// TODO(gc): Do something about age-mark in paged new-space.
Vyacheslav Egorov (Chromium) 2011/06/14 12:12:46 You can remove this todo.
- return old_address < new_space_.age_mark()
+ NewSpacePage* page = NewSpacePage::FromAddress(old_address);
+ Address age_mark = new_space_.age_mark();
+ bool below_mark = page->IsFlagSet(MemoryChunk::NEW_SPACE_BELOW_AGE_MARK)
+ && (!page->ContainsLimit(age_mark) || old_address < age_mark);
+ return below_mark
|| (new_space_.Size() + object_size) >= (new_space_.Capacity() >> 2);
Vyacheslav Egorov (Chromium) 2011/06/14 12:12:46 move || to the end of the previous line
}
« no previous file with comments | « no previous file | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698