Chromium Code Reviews| Index: runtime/vm/heap.h |
| diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h |
| index fb4e92799a2426e08f45b599b209bafa1b64627a..9d60c11b02e461953512e6719e5f6b5d3dffb814 100644 |
| --- a/runtime/vm/heap.h |
| +++ b/runtime/vm/heap.h |
| @@ -73,15 +73,22 @@ class Heap { |
| return 0; |
| } |
| - uword TryAllocate(intptr_t size, Space space) { |
| + uword TryAllocate( |
| + intptr_t size, |
| + Space space, |
| + PageSpace::GrowthPolicy growth_policy = PageSpace::kForceGrowth) { |
|
Ivan Posva
2012/11/15 01:02:24
Carl says: "That's wrong!"
|
| ASSERT(!read_only_); |
| switch (space) { |
| case kNew: |
| return new_space_->TryAllocate(size); |
| case kOld: |
| - return old_space_->TryAllocate(size, HeapPage::kData); |
| + return old_space_->TryAllocate(size, |
| + HeapPage::kData, |
| + growth_policy); |
| case kCode: |
| - return old_space_->TryAllocate(size, HeapPage::kExecutable); |
| + return old_space_->TryAllocate(size, |
| + HeapPage::kExecutable, |
| + growth_policy); |
| default: |
| UNREACHABLE(); |
| } |