| Index: runtime/vm/pages.h
|
| diff --git a/runtime/vm/pages.h b/runtime/vm/pages.h
|
| index 83a07ddc0ffc45f2d10652dddbb95a43ce948474..48b216f71e877748c1583ca56e876d8adc3a4ade 100644
|
| --- a/runtime/vm/pages.h
|
| +++ b/runtime/vm/pages.h
|
| @@ -5,6 +5,8 @@
|
| #ifndef VM_PAGES_H_
|
| #define VM_PAGES_H_
|
|
|
| +#include <map>
|
| +
|
| #include "vm/freelist.h"
|
| #include "vm/globals.h"
|
| #include "vm/virtual_memory.h"
|
| @@ -201,6 +203,16 @@ class PageSpace {
|
|
|
| void WriteProtect(bool read_only);
|
|
|
| + typedef std::map<RawObject*, void*> PeerTable;
|
| +
|
| + void SetPeer(RawObject* raw_obj, void* peer);
|
| +
|
| + void* GetPeer(RawObject* raw_obj);
|
| +
|
| + int64_t PeerCount() const;
|
| +
|
| + PeerTable* GetPeerTable() { return &peer_table_; }
|
| +
|
| private:
|
| static const intptr_t kAllocatablePageSize = kPageSize - sizeof(HeapPage);
|
|
|
| @@ -227,6 +239,8 @@ class PageSpace {
|
| HeapPage* pages_tail_;
|
| HeapPage* large_pages_;
|
|
|
| + PeerTable peer_table_;
|
| +
|
| // Page being used for bump allocation.
|
| // The value has different meanings:
|
| // NULL: Still bump allocating from last allocated fresh page.
|
|
|