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

Unified Diff: include/v8.h

Issue 12790004: Made AdjustAmountOfExternalAllocatedMemory an instance method of Isolate (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Feedback Created 7 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 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);
« 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