| Index: src/heap/heap.h
|
| diff --git a/src/heap/heap.h b/src/heap/heap.h
|
| index 74b9d85a15aed7ce8ec43fd23986cfa8cd01b7c8..ecb08fb0a77cdec86a7568000d1a586570853532 100644
|
| --- a/src/heap/heap.h
|
| +++ b/src/heap/heap.h
|
| @@ -625,11 +625,9 @@ class Heap {
|
| return old_space_->allocation_limit_address();
|
| }
|
|
|
| - // TODO(hpayer): There is still a missmatch between capacity and actual
|
| - // committed memory size.
|
| - bool CanExpandOldGeneration(int size = 0) {
|
| + bool CanExpandOldGeneration(int size) {
|
| if (force_oom_) return false;
|
| - return (CommittedOldGenerationMemory() + size) < MaxOldGenerationSize();
|
| + return (OldGenerationCapacity() + size) < MaxOldGenerationSize();
|
| }
|
|
|
| // Clear the Instanceof cache (used when a prototype changes).
|
| @@ -1192,6 +1190,9 @@ class Heap {
|
| // more spaces are needed until it reaches the limit.
|
| intptr_t Capacity();
|
|
|
| + // Returns the capacity of the old generation.
|
| + intptr_t OldGenerationCapacity();
|
| +
|
| // Returns the amount of memory currently committed for the heap.
|
| intptr_t CommittedMemory();
|
|
|
|
|