Index: runtime/vm/pages.h |
diff --git a/runtime/vm/pages.h b/runtime/vm/pages.h |
index 12b193f64a01eb748db20435103a1df9260ee3d0..bd4ab5c5822340b37437b18da0e7784d98f1a592 100644 |
--- a/runtime/vm/pages.h |
+++ b/runtime/vm/pages.h |
@@ -141,8 +141,11 @@ class PageSpaceController { |
last_code_collection_in_us_ = t; |
} |
- void Enable(SpaceUsage current) { |
+ void set_last_usage(SpaceUsage current) { |
last_usage_ = current; |
+ } |
+ |
+ void Enable() { |
is_enabled_ = true; |
} |
void Disable() { |
@@ -265,9 +268,14 @@ class PageSpace { |
void StartEndAddress(uword* start, uword* end) const; |
+ void InitGrowthControl() { |
+ page_space_controller_.set_last_usage(usage_); |
+ page_space_controller_.Enable(); |
+ } |
+ |
void SetGrowthControlState(bool state) { |
if (state) { |
- page_space_controller_.Enable(usage_); |
+ page_space_controller_.Enable(); |
} else { |
page_space_controller_.Disable(); |
} |