| Index: runtime/vm/heap.cc
|
| ===================================================================
|
| --- runtime/vm/heap.cc (revision 33235)
|
| +++ runtime/vm/heap.cc (working copy)
|
| @@ -91,7 +91,22 @@
|
| return addr;
|
| }
|
|
|
| +void Heap::AllocateExternal(intptr_t size, RawObject* ref) {
|
| + if (ref->IsHeapObject() && ref->IsNewObject()) {
|
| + new_space_->AllocateExternal(size);
|
| + } else {
|
| + old_space_->AllocateExternal(size);
|
| + }
|
| +}
|
|
|
| +void Heap::FreeExternal(intptr_t size, RawObject* ref) {
|
| + if (ref->IsHeapObject() && ref->IsNewObject()) {
|
| + new_space_->FreeExternal(size);
|
| + } else {
|
| + old_space_->FreeExternal(size);
|
| + }
|
| +}
|
| +
|
| bool Heap::Contains(uword addr) const {
|
| return new_space_->Contains(addr) ||
|
| old_space_->Contains(addr);
|
| @@ -334,6 +349,10 @@
|
| old_space_->CapacityInWords();
|
| }
|
|
|
| +intptr_t Heap::ExternalAllocatedInWords(Space space) const {
|
| + return space == kNew ? new_space_->ExternalAllocatedInWords() :
|
| + old_space_->ExternalAllocatedInWords();
|
| +}
|
|
|
| int64_t Heap::GCTimeInMicros(Space space) const {
|
| if (space == kNew) {
|
|
|