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

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

Issue 1133773002: Keep track of array buffers in new space separately (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 7 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
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 7e02afa3c9ebe65c982d8dffed41b3819e5574f5..e554b3535455c2239d443523d169c578c702fa37 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -3106,6 +3106,9 @@ bool MarkCompactCollector::TryPromoteObject(HeapObject* object,
#endif
if (allocation.To(&target)) {
MigrateObject(target, object, object_size, old_space->identity());
+ if (target->IsJSArrayBuffer()) {
+ heap()->PromoteArrayBuffer(JSArrayBuffer::cast(target));
Hannes Payer (out of office) 2015/05/08 13:39:29 Please don't add any JS type specific functionalit
+ }
heap()->IncrementPromotedObjectsSize(object_size);
return true;
}
@@ -4412,7 +4415,9 @@ void MarkCompactCollector::SweepSpaces() {
#ifdef DEBUG
state_ = SWEEP_SPACES;
#endif
- heap()->FreeDeadArrayBuffers();
+ // MarkCompact will always also evacuate the new space.
+ heap()->FreeDeadArrayBuffers(true);
+ heap()->FreeDeadArrayBuffers(false);
MoveEvacuationCandidatesToEndOfPagesList();
« src/heap/heap.cc ('K') | « src/heap/heap.cc ('k') | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698