Chromium Code Reviews| Index: runtime/vm/scavenger.h |
| diff --git a/runtime/vm/scavenger.h b/runtime/vm/scavenger.h |
| index f803a85d362626b1c546a8837b5d6fa3e3fd6cb9..818fecb8d735e12953b3775a226a1ac98381866a 100644 |
| --- a/runtime/vm/scavenger.h |
| +++ b/runtime/vm/scavenger.h |
| @@ -5,6 +5,8 @@ |
| #ifndef VM_SCAVENGER_H_ |
| #define VM_SCAVENGER_H_ |
| +#include <map> |
| + |
| #include "platform/assert.h" |
| #include "platform/utils.h" |
| #include "vm/flags.h" |
| @@ -87,6 +89,12 @@ class Scavenger { |
| void WriteProtect(bool read_only); |
| + void SetPeer(RawObject* raw_obj, void* peer); |
| + |
| + void* GetPeer(RawObject* raw_obj); |
| + |
| + int64_t PeerCount() const; |
| + |
| private: |
| uword FirstObjectStart() const { return to_->start() | object_alignment_; } |
| void Prologue(Isolate* isolate, bool invoke_api_callbacks); |
| @@ -125,12 +133,16 @@ class Scavenger { |
| return end_ < to_->end(); |
| } |
| + void ProcessPeerReferents(); |
| + |
| VirtualMemory* space_; |
| MemoryRegion* to_; |
| MemoryRegion* from_; |
| Heap* heap_; |
| + std::map<RawObject*, void*> peer_; |
|
siva
2012/09/14 00:03:46
peer_table_ or peer_map_ ?
|
| + |
| // Current allocation top and end. These values are being accessed directly |
| // from generated code. |
| uword top_; |