Index: src/spaces.h |
diff --git a/src/spaces.h b/src/spaces.h |
index 4f2d07b0c8176118fca2722d135e6da097a50b34..6165255fd47a27c89b8db68325f38e404edbb94d 100644 |
--- a/src/spaces.h |
+++ b/src/spaces.h |
@@ -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; |