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

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..ce996e958042201d726197fdaf31b574f6d30eaa 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/12 06:33:28 I think we should clean that up together with the
+ }
heap()->IncrementPromotedObjectsSize(object_size);
return true;
}
@@ -4412,7 +4415,6 @@ void MarkCompactCollector::SweepSpaces() {
#ifdef DEBUG
state_ = SWEEP_SPACES;
#endif
- heap()->FreeDeadArrayBuffers();
MoveEvacuationCandidatesToEndOfPagesList();
@@ -4440,6 +4442,8 @@ void MarkCompactCollector::SweepSpaces() {
EvacuateNewSpaceAndCandidates();
+ heap()->FreeDeadArrayBuffers(false);
+
// ClearNonLiveReferences depends on precise sweeping of map space to
// detect whether unmarked map became dead in this collection or in one
// of the previous ones.
« 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