summaryrefslogtreecommitdiff
path: root/deps/v8/src/spaces.h
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-11-11 22:42:06 -0800
committerRyan Dahl <ry@tinyclouds.org>2010-11-11 22:42:06 -0800
commit564a48643bd3edc6da845e458277a54c8068d0e2 (patch)
treeea483922ae95ef2f1c206aaab2238bf58fd860df /deps/v8/src/spaces.h
parentd4af8a6b6ac0045620ad6da94e97a71e6e6fad52 (diff)
downloadnode-564a48643bd3edc6da845e458277a54c8068d0e2.tar.gz
Upgrade V8 to 2.5.6
Diffstat (limited to 'deps/v8/src/spaces.h')
-rw-r--r--deps/v8/src/spaces.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/deps/v8/src/spaces.h b/deps/v8/src/spaces.h
index 3ed2fe8b9..0c10d2c77 100644
--- a/deps/v8/src/spaces.h
+++ b/deps/v8/src/spaces.h
@@ -491,8 +491,8 @@ class CodeRange : public AllStatic {
class MemoryAllocator : public AllStatic {
public:
// Initializes its internal bookkeeping structures.
- // Max capacity of the total space.
- static bool Setup(intptr_t max_capacity);
+ // Max capacity of the total space and executable memory limit.
+ static bool Setup(intptr_t max_capacity, intptr_t capacity_executable);
// Deletes valid chunks.
static void TearDown();
@@ -590,6 +590,12 @@ class MemoryAllocator : public AllStatic {
// Returns allocated spaces in bytes.
static intptr_t Size() { return size_; }
+ // Returns the maximum available executable bytes of heaps.
+ static int AvailableExecutable() {
+ if (capacity_executable_ < size_executable_) return 0;
+ return capacity_executable_ - size_executable_;
+ }
+
// Returns allocated executable spaces in bytes.
static intptr_t SizeExecutable() { return size_executable_; }
@@ -653,6 +659,8 @@ class MemoryAllocator : public AllStatic {
private:
// Maximum space size in bytes.
static intptr_t capacity_;
+ // Maximum subset of capacity_ that can be executable
+ static intptr_t capacity_executable_;
// Allocated space size in bytes.
static intptr_t size_;