Index: include/v8-platform.h |
diff --git a/include/v8-platform.h b/include/v8-platform.h |
index e11567488b6a3ca45780d52d11d6d1b3696b44ba..41d2b40fbb2b23f047f9de41898eb00c99c4c10b 100644 |
--- a/include/v8-platform.h |
+++ b/include/v8-platform.h |
@@ -212,6 +212,24 @@ class Platform { |
/** Removes tracing state change observer. */ |
virtual void RemoveTraceStateObserver(TraceStateObserver*) {} |
+ |
+ /** |
+ * Returns true if the system-wide available free memory (referred to as the |
+ * global memory budget) can be obtained via GetGlobalMemoryBudget(). |
+ */ |
+ virtual bool IsGlobalMemoryBudgetAvailable() { return false; } |
+ |
+ /** |
+ * Returns the global memory budget. A nagative value can be returned when |
+ * the global memory budget is unknown or the system is under high memory |
+ * pressure. |
+ */ |
+ virtual int64_t GetGlobalMemoryBudget() { return -1; } |
+ |
+ /** |
+ * TODO(bashi): Tentative. Set an interval to update the global memory budget. |
+ */ |
+ virtual void SetGlobalMemoryBudgetUpdateInterval(uint32_t interval_ms) {} |
}; |
} // namespace v8 |