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

Unified Diff: src/heap/spaces.cc

Issue 2806463002: Fix free space repairing after deserialization. (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index c58b827368dae4c6913c9af67348d5597d2894d9..97795baa5f76685dcfb02d204d7cb9fba5150542 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -2839,7 +2839,12 @@ void PagedSpace::RepairFreeListsAfterDeserialization() {
size_t size = page->wasted_memory();
if (size == 0) continue;
DCHECK_GE(static_cast<size_t>(Page::kPageSize), size);
- Address address = page->OffsetToAddress(Page::kPageSize - size);
+ Address address =
Slava Chigrin 2017/04/06 12:30:13 I suppose here was a bug. As described here https:
ulan 2017/04/06 15:11:27 We can use page->HighWaterMark() and page->area_en
Slava Chigrin 2017/04/06 15:48:34 Done.
+ page->OffsetToAddress((page->executable() == EXECUTABLE
+ ? MemoryAllocator::CodePageAreaEndOffset()
+ : Page::kPageSize) -
+ size);
+
heap()->CreateFillerObjectAt(address, static_cast<int>(size),
ClearRecordedSlots::kNo);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698