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

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

Issue 1316873004: heap: make array buffer maps disjoint (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 4 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') | no next file » | 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 f95b91ac4db80791a7cf2dc9ea408e9369a1286e..d431aa0dfa082eb791fb87d037e8865edb1f1155 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -4431,10 +4431,13 @@ void MarkCompactCollector::SweepSpaces() {
// buffer entries are already filter out. We can just release the memory.
heap()->FreeQueuedChunks();
- heap()->FreeDeadArrayBuffers(false);
-
EvacuateNewSpaceAndCandidates();
+ // NOTE: ArrayBuffers must be evacuated first, before freeing them. Otherwise
Michael Lippautz 2015/09/01 08:30:06 Can you elaborate on this comment a bit more. Why
fedor.indutny 2015/09/01 08:50:08 I might not be understanding this correctly, but w
Michael Lippautz 2015/09/01 09:01:36 StaticMarkingVisitor is also registering live arra
+ // not yet discovered buffers for scavenge will have all of them, and they
+ // will be erroneously freed.
+ heap()->FreeDeadArrayBuffers(false);
+
// Clear the marking state of live large objects.
heap_->lo_space()->ClearMarkingStateOfLiveObjects();
« no previous file with comments | « src/heap/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698