Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Unified Diff: runtime/vm/virtual_memory.h

Issue 2148533002: Fuchsia: Platform specific calls needed to Initialize and Cleanup VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/os_fuchsia.cc ('k') | runtime/vm/virtual_memory_fuchsia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « runtime/vm/os_fuchsia.cc ('k') | runtime/vm/virtual_memory_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698