Commit 46f57bea authored by vegorov@chromium.org's avatar vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1e08a785
......@@ -2121,6 +2121,12 @@ class MapSpace : public FixedSpace {
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment