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

Unified Diff: src/heap/mark-compact.cc

Issue 1393293002: [heap] Fix mark bits for partially compacted pages. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation Created 5 years, 2 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/heap/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 8a32ba8bda28d08c91b6876a3c4d9ed038fad9f6..8232dd5b0e0b6d819a3adfae3a2ecc99c01489d3 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -3353,6 +3353,12 @@ bool MarkCompactCollector::EvacuateLiveObjectsFromPage(
HeapObject* target_object = nullptr;
AllocationResult allocation = target_space->AllocateRaw(size, alignment);
if (!allocation.To(&target_object)) {
+ // We need to abort compaction for this page. Make sure that we reset
+ // the mark bits for objects that have already been migrated.
+ if (i > 0) {
+ p->markbits()->ClearRange(p->AddressToMarkbitIndex(p->area_start()),
+ p->AddressToMarkbitIndex(object_addr));
+ }
return false;
}
« no previous file with comments | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698