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

Unified Diff: include/v8.h

Issue 23464022: Add a ResourceConstraint for the embedder to specify that V8 is running on a memory constrained dev… (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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/isolate.h » ('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 eb166ab68d2e53745f8659ae1c1648785488d215..6d5f00dc952bcc5802158d731f46c5e140930fd4 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3763,11 +3763,16 @@ class V8EXPORT ResourceConstraints {
uint32_t* stack_limit() const { return stack_limit_; }
// Sets an address beyond which the VM's stack may not grow.
void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
+ bool is_memory_constrained() { return is_memory_constrained_; }
+ // If set to true, V8 will limit it's memory usage, at the potential cost of
+ // lower performance.
+ void set_memory_constrained(bool value) { is_memory_constrained_ = value; }
private:
int max_young_space_size_;
int max_old_space_size_;
int max_executable_size_;
uint32_t* stack_limit_;
+ bool is_memory_constrained_;
};
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/isolate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698