summaryrefslogtreecommitdiffstats
path: root/V8Binding/v8/src/heap.h
diff options
context:
space:
mode:
Diffstat (limited to 'V8Binding/v8/src/heap.h')
-rw-r--r--V8Binding/v8/src/heap.h25
1 files changed, 7 insertions, 18 deletions
diff --git a/V8Binding/v8/src/heap.h b/V8Binding/v8/src/heap.h
index 55a66bc..4e2c64c 100644
--- a/V8Binding/v8/src/heap.h
+++ b/V8Binding/v8/src/heap.h
@@ -746,7 +746,7 @@ class Heap : public AllStatic {
static Object* CreateSymbol(String* str);
// Write barrier support for address[offset] = o.
- inline static void RecordWrite(Address address, int offset);
+ static inline void RecordWrite(Address address, int offset);
// Given an address occupied by a live code object, return that object.
static Object* FindCodeObject(Address a);
@@ -802,22 +802,7 @@ class Heap : public AllStatic {
// Adjusts the amount of registered external memory.
// Returns the adjusted value.
- static int AdjustAmountOfExternalAllocatedMemory(int change_in_bytes) {
- int amount = amount_of_external_allocated_memory_ + change_in_bytes;
- if (change_in_bytes >= 0) {
- // Avoid overflow.
- if (amount > amount_of_external_allocated_memory_) {
- amount_of_external_allocated_memory_ = amount;
- }
- } else {
- // Avoid underflow.
- if (amount >= 0) {
- amount_of_external_allocated_memory_ = amount;
- }
- }
- ASSERT(amount_of_external_allocated_memory_ >= 0);
- return amount_of_external_allocated_memory_;
- }
+ static inline int AdjustAmountOfExternalAllocatedMemory(int change_in_bytes);
// Allocate unitialized fixed array (pretenure == NON_TENURE).
static Object* AllocateRawFixedArray(int length);
@@ -901,6 +886,10 @@ class Heap : public AllStatic {
// every allocation in large object space.
static int old_gen_allocation_limit_;
+ // Limit on the amount of externally allocated memory allowed
+ // between global GCs. If reached a global GC is forced.
+ static int external_allocation_limit_;
+
// The amount of external memory registered through the API kept alive
// by global handles
static int amount_of_external_allocated_memory_;
@@ -1230,7 +1219,7 @@ class KeyedLookupCache {
// Clear the cache.
static void Clear();
private:
- inline static int Hash(Map* map, String* name);
+ static inline int Hash(Map* map, String* name);
static const int kLength = 64;
struct Key {
Map* map;