| Index: vm/heap.h
|
| ===================================================================
|
| --- vm/heap.h (revision 2792)
|
| +++ vm/heap.h (working copy)
|
| @@ -6,17 +6,17 @@
|
| #define VM_HEAP_H_
|
|
|
| #include "vm/allocation.h"
|
| +#include "vm/assert.h"
|
| #include "vm/flags.h"
|
| #include "vm/globals.h"
|
| #include "vm/pages.h"
|
| +#include "vm/scavenger.h"
|
|
|
| namespace dart {
|
|
|
| // Forward declarations.
|
| class Isolate;
|
| class ObjectPointerVisitor;
|
| -class PageSpace;
|
| -class Scavenger;
|
| class VirtualMemory;
|
|
|
| DECLARE_FLAG(bool, verbose_gc);
|
| @@ -56,6 +56,19 @@
|
| return 0;
|
| }
|
|
|
| + uword TryAllocate(intptr_t size, Space space) {
|
| + switch (space) {
|
| + case kNew:
|
| + return new_space_->TryAllocate(size);
|
| + case kOld:
|
| + return old_space_->TryAllocate(size);
|
| + case kExecutable:
|
| + return code_space_->TryAllocate(size);
|
| + default:
|
| + UNREACHABLE();
|
| + }
|
| + }
|
| +
|
| // Heap contains the specified address.
|
| bool Contains(uword addr) const;
|
| bool CodeContains(uword addr) const;
|
|
|