Revision: 6954
Author: [email protected]
Date: Fri Feb 25 07:00:46 2011
Log: Flush watermarks after compacting map space on mark-sweep collection.

MapCompact does not use MC-allocation routines so watermarks are not updated automatically and might become inconsistent.

BUG=http://crbug.com/59688

Review URL: http://codereview.chromium.org/6588007
http://code.google.com/p/v8/source/detail?r=6954

Modified:
 /branches/bleeding_edge/src/spaces.h

=======================================
--- /branches/bleeding_edge/src/spaces.h        Fri Dec 17 06:50:24 2010
+++ /branches/bleeding_edge/src/spaces.h        Fri Feb 25 07:00:46 2011
@@ -2121,6 +2121,12 @@
     accounting_stats_.DeallocateBytes(accounting_stats_.Size());
     accounting_stats_.AllocateBytes(new_size);

+    // Flush allocation watermarks.
+    for (Page* p = first_page_; p != top_page; p = p->next_page()) {
+      p->SetAllocationWatermark(p->AllocationTop());
+    }
+    top_page->SetAllocationWatermark(new_top);
+
 #ifdef DEBUG
     if (FLAG_enable_slow_asserts) {
       intptr_t actual_size = 0;

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to