Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: include/v8.h

Issue 1777883002: Add memory pressure interrupt for memory pressure notification Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 62319203f418c4522b103b3d54ced4e43f09971b..49aa9c5a54d0ff3af21db25b56cd86624dc4338b 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -5875,6 +5875,12 @@ class V8_EXPORT Isolate {
void RequestInterrupt(InterruptCallback callback, void* data);
/**
+ * Request V8 to interrupt long running JavaScript code and do GC,
+ * when system memory is pressured.
+ */
+ void RequestMemoryPressureInterrupt();
jochen (gone - plz use gerrit) 2016/03/09 15:18:59 I'd prefer an API ReportMemoryPressure(level) wher
+
+ /**
* Request garbage collection in this Isolate. It is only valid to call this
* function if --expose_gc was specified.
*
@@ -6027,6 +6033,12 @@ class V8_EXPORT Isolate {
void LowMemoryNotification();
/**
+ * Optional notification that memory pressure interrupt is requested.
+ * V8 uses these notifications to attempt to free memory.
+ */
+ void GCNotificationBasedOnMemoryPressureInterrupt();
jochen (gone - plz use gerrit) 2016/03/09 15:18:59 that shouldn't be required
+
+ /**
* Optional notification that a context has been disposed. V8 uses
* these notifications to guide the GC heuristic. Returns the number
* of context disposals - including this one - since the last time
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698