Chromium Code Reviews| 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
|
| } |