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
This commit is contained in:
vegorov@chromium.org 2011-02-25 15:00:46 +00:00
parent 1e08a785a9
commit 46f57beaa6

View File

@ -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;