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

Unified Diff: src/builtins.cc

Issue 7247002: Estimate a (close) upper bound on the size of black-marked objects on each page. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Address review comments. Make compile on x64. Created 9 years, 6 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/assembler.h ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 3df7000c937774e392a4438480483f408372b24a..75c1b6524339e5f5240bda1fa3b33cad81546eb1 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -363,8 +363,11 @@ static FixedArray* LeftTrimFixedArray(Heap* heap,
// Maintain marking consistency for HeapObjectIterator and
// IncrementalMarking.
- heap->marking()->TransferMark(elms->address(),
- elms->address() + to_trim * kPointerSize);
+ int size_delta = to_trim * kPointerSize;
+ if (heap->marking()->TransferMark(elms->address(),
+ elms->address() + size_delta)) {
+ MemoryChunk::IncrementLiveBytes(elms->address(), -size_delta);
+ }
return FixedArray::cast(HeapObject::FromAddress(
elms->address() + to_trim * kPointerSize));
« no previous file with comments | « src/assembler.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698