| Index: runtime/vm/heap.h
|
| ===================================================================
|
| --- runtime/vm/heap.h (revision 35410)
|
| +++ runtime/vm/heap.h (working copy)
|
| @@ -117,18 +117,18 @@
|
| bool StubCodeContains(uword addr) const;
|
|
|
| // Visit all pointers.
|
| - void IteratePointers(ObjectPointerVisitor* visitor);
|
| + void IteratePointers(ObjectPointerVisitor* visitor) const;
|
|
|
| // Visit all pointers in the space.
|
| - void IterateNewPointers(ObjectPointerVisitor* visitor);
|
| - void IterateOldPointers(ObjectPointerVisitor* visitor);
|
| + void IterateNewPointers(ObjectPointerVisitor* visitor) const;
|
| + void IterateOldPointers(ObjectPointerVisitor* visitor) const;
|
|
|
| // Visit all objects.
|
| - void IterateObjects(ObjectVisitor* visitor);
|
| + void IterateObjects(ObjectVisitor* visitor) const;
|
|
|
| // Visit all object in the space.
|
| - void IterateNewObjects(ObjectVisitor* visitor);
|
| - void IterateOldObjects(ObjectVisitor* visitor);
|
| + void IterateNewObjects(ObjectVisitor* visitor) const;
|
| + void IterateOldObjects(ObjectVisitor* visitor) const;
|
|
|
| // Find an object by visiting all pointers in the specified heap space,
|
| // the 'visitor' is used to determine if an object is found or not.
|
| @@ -249,6 +249,8 @@
|
| return old_space_->PrintHeapMapToJSONStream(isolate, stream);
|
| }
|
|
|
| + Isolate* isolate() const { return isolate_; }
|
| +
|
| private:
|
| class GCStats : public ValueObject {
|
| public:
|
| @@ -282,7 +284,9 @@
|
|
|
| static const intptr_t kNewAllocatableSize = 256 * KB;
|
|
|
| - Heap(intptr_t max_new_gen_words, intptr_t max_old_gen_words);
|
| + Heap(Isolate* isolate,
|
| + intptr_t max_new_gen_words,
|
| + intptr_t max_old_gen_words);
|
|
|
| uword AllocateNew(intptr_t size);
|
| uword AllocateOld(intptr_t size, HeapPage::PageType type);
|
| @@ -298,6 +302,8 @@
|
| // of this heap.
|
| void GetMergedAddressRange(uword* start, uword* end) const;
|
|
|
| + Isolate* isolate_;
|
| +
|
| // The different spaces used for allocation.
|
| Scavenger* new_space_;
|
| PageSpace* old_space_;
|
|
|