Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 7016cb5754abbcc31a4f9dd4d9080c968e604cf7..bfc56f1fc336b5b0ffca750314678898aaaa1326 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -3007,6 +3007,21 @@ class V8EXPORT Isolate { |
*/ |
void GetHeapStatistics(HeapStatistics* heap_statistics); |
+ /** |
+ * Adjusts the amount of registered external memory. Used to give V8 an |
+ * indication of the amount of externally allocated memory that is kept alive |
+ * by JavaScript objects. V8 uses this to decide when to perform global |
+ * garbage collections. Registering externally allocated memory will trigger |
+ * global garbage collections more often than it would otherwise in an attempt |
+ * to garbage collect the JavaScript objects that keep the externally |
+ * allocated memory alive. |
+ * |
+ * \param change_in_bytes the change in externally allocated memory that is |
+ * kept alive by JavaScript objects. |
+ * \returns the adjusted value. |
+ */ |
+ intptr_t AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes); |
+ |
private: |
Isolate(); |
Isolate(const Isolate&); |
@@ -3487,20 +3502,8 @@ class V8EXPORT V8 { |
static void SetJitCodeEventHandler(JitCodeEventOptions options, |
JitCodeEventHandler event_handler); |
- /** |
- * Adjusts the amount of registered external memory. Used to give |
- * V8 an indication of the amount of externally allocated memory |
- * that is kept alive by JavaScript objects. V8 uses this to decide |
- * when to perform global garbage collections. Registering |
- * externally allocated memory will trigger global garbage |
- * collections more often than otherwise in an attempt to garbage |
- * collect the JavaScript objects keeping the externally allocated |
- * memory alive. |
- * |
- * \param change_in_bytes the change in externally allocated memory |
- * that is kept alive by JavaScript objects. |
- * \returns the adjusted value. |
- */ |
+ // TODO(svenpanne) Really deprecate me when Chrome is fixed. |
+ /** Deprecated. Use Isolate::AdjustAmountOfExternalAllocatedMemory instead. */ |
static intptr_t AdjustAmountOfExternalAllocatedMemory( |
intptr_t change_in_bytes); |