Chromium Code Reviews| Index: src/heap.h |
| =================================================================== |
| --- src/heap.h (revision 3089) |
| +++ src/heap.h (working copy) |
| @@ -228,7 +228,7 @@ |
| public: |
| // Configure heap size before setup. Return false if the heap has been |
| // setup already. |
| - static bool ConfigureHeap(int semispace_size, int old_gen_size); |
| + static bool ConfigureHeap(int max_semispace_size, int max_old_gen_size); |
| static bool ConfigureHeapDefault(); |
| // Initializes the global object heap. If create_heap_objects is true, |
| @@ -247,14 +247,14 @@ |
| // Returns whether Setup has been called. |
| static bool HasBeenSetup(); |
| - // Returns the maximum heap capacity. |
| - static int MaxCapacity() { |
| - return young_generation_size_ + old_generation_size_; |
| + // Returns the maximum amount of memory reserved for the heap. |
| + static int MaxReserved() { |
| + return 4 * reserved_semispace_size_ + max_old_generation_size_; |
|
Erik Corry
2009/10/21 13:41:49
The 4 here probably deserves a comment.
|
| } |
| - static int SemiSpaceSize() { return semispace_size_; } |
| + static int MaxSemiSpaceSize() { return max_semispace_size_; } |
| + static int ReservedSemiSpaceSize() { return reserved_semispace_size_; } |
| static int InitialSemiSpaceSize() { return initial_semispace_size_; } |
| - static int YoungGenerationSize() { return young_generation_size_; } |
| - static int OldGenerationSize() { return old_generation_size_; } |
| + static int MaxOldGenerationSize() { return max_old_generation_size_; } |
| // Returns the capacity of the heap in bytes w/o growing. Heap grows when |
| // more spaces are needed until it reaches the limit. |
| @@ -885,10 +885,10 @@ |
| static Object* NumberToString(Object* number); |
| private: |
| - static int semispace_size_; |
| + static int reserved_semispace_size_; |
| + static int max_semispace_size_; |
| static int initial_semispace_size_; |
| - static int young_generation_size_; |
| - static int old_generation_size_; |
| + static int max_old_generation_size_; |
| static size_t code_range_size_; |
| // For keeping track of how much data has survived |