Index: runtime/vm/virtual_memory.h |
diff --git a/runtime/vm/virtual_memory.h b/runtime/vm/virtual_memory.h |
index 270d3cf8f763c4b268f09a2a714e142ee4943532..6e43cb43c61ec66edcdea6034d5fb0e0046fbea7 100644 |
--- a/runtime/vm/virtual_memory.h |
+++ b/runtime/vm/virtual_memory.h |
@@ -24,6 +24,7 @@ class VirtualMemory { |
// The reserved memory is unmapped on destruction. |
~VirtualMemory(); |
+ int32_t handle() const { return handle_; } |
uword start() const { return region_.start(); } |
uword end() const { return region_.end(); } |
void* address() const { return region_.pointer(); } |
@@ -82,9 +83,10 @@ class VirtualMemory { |
// This constructor is only used internally when reserving new virtual spaces. |
// It does not reserve any virtual address space on its own. |
- explicit VirtualMemory(const MemoryRegion& region) : |
+ explicit VirtualMemory(const MemoryRegion& region, int32_t handle = 0) : |
region_(region.pointer(), region.size()), |
reserved_size_(region.size()), |
+ handle_(handle), |
embedder_allocated_(false) { } |
MemoryRegion region_; |
@@ -93,6 +95,8 @@ class VirtualMemory { |
// Its start coincides with region_, but its size might not, due to Truncate. |
intptr_t reserved_size_; |
+ int32_t handle_; |
+ |
static uword page_size_; |
// True for a region provided by the embedder. |