Index: src/heap.h |
=================================================================== |
--- src/heap.h (revision 2510) |
+++ src/heap.h (working copy) |
@@ -746,7 +746,7 @@ |
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 @@ |
// 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 @@ |
// 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 @@ |
// 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; |