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

Unified Diff: include/v8.h

Issue 29053002: Provide a mechanism for the embedder to set a TotalPhysicalMemory callback function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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') | src/api.cc » ('J')
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 1ec04816871f8000ba7032654b71ae7bcb9f0802..2c7a9a8a7fc40fe0d635ef4f986f66d137cf48e9 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3844,6 +3844,8 @@ typedef void (*MemoryAllocationCallback)(ObjectSpace space,
AllocationAction action,
int size);
+typedef uint64_t (*TotalPhysicalMemoryCallback)();
+
// --- Leave Script Callback ---
typedef void (*CallCompletedCallback)();
@@ -4467,10 +4469,16 @@ class V8_EXPORT V8 {
static void SetCreateHistogramFunction(CreateHistogramCallback);
static void SetAddHistogramSampleFunction(AddHistogramSampleCallback);
- /** Callback function for reporting failed access checks.*/
+ /** Callback function for reporting failed access checks. */
static void SetFailedAccessCheckCallbackFunction(FailedAccessCheckCallback);
/**
+ * Enables the host application to provide a function which returns the total
+ * amount of physical memory available on the platform.
+ */
+ static void SetTotalPhysicalMemoryFunction(TotalPhysicalMemoryCallback);
+
+ /**
* Enables the host application to receive a notification before a
* garbage collection. Allocations are not allowed in the
* callback function, you therefore cannot manipulate objects (set
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698