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

Unified Diff: src/heap/heap-inl.h

Issue 2209583002: [heap] Remove border page (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Allow empty intermediate generation Created 4 years, 3 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 | « src/heap/heap.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap-inl.h
diff --git a/src/heap/heap-inl.h b/src/heap/heap-inl.h
index 9499546850e55f5133daecb1286a52faadcdcb96..dda9a89c988b47349b26d07b7920064d76a82c58 100644
--- a/src/heap/heap-inl.h
+++ b/src/heap/heap-inl.h
@@ -519,9 +519,6 @@ bool Heap::OldGenerationAllocationLimitReached() {
template <PromotionMode promotion_mode>
bool Heap::ShouldBePromoted(Address old_address, int object_size) {
- Page* page = Page::FromAddress(old_address);
- Address age_mark = new_space_->age_mark();
-
if (promotion_mode == PROMOTE_MARKED) {
MarkBit mark_bit = ObjectMarking::MarkBitFrom(old_address);
if (!Marking::IsWhite(mark_bit)) {
@@ -529,8 +526,7 @@ bool Heap::ShouldBePromoted(Address old_address, int object_size) {
}
}
- return page->IsFlagSet(MemoryChunk::NEW_SPACE_BELOW_AGE_MARK) &&
- (!page->ContainsLimit(age_mark) || old_address < age_mark);
+ return Page::FromAddress(old_address)->InIntermediateGeneration();
}
PromotionMode Heap::CurrentPromotionMode() {
@@ -631,16 +627,8 @@ AllocationMemento* Heap::FindAllocationMemento(HeapObject* object) {
// Bail out if the memento is below the age mark, which can happen when
// mementos survived because a page got moved within new space.
Page* object_page = Page::FromAddress(object_address);
- if (object_page->IsFlagSet(Page::NEW_SPACE_BELOW_AGE_MARK)) {
- Address age_mark =
- reinterpret_cast<SemiSpace*>(object_page->owner())->age_mark();
- if (!object_page->Contains(age_mark)) {
- return nullptr;
- }
- // Do an exact check in the case where the age mark is on the same page.
- if (object_address < age_mark) {
- return nullptr;
- }
+ if (object_page->InIntermediateGeneration()) {
+ return nullptr;
}
AllocationMemento* memento_candidate = AllocationMemento::cast(candidate);
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698