Index: runtime/vm/virtual_memory.h |
diff --git a/runtime/vm/virtual_memory.h b/runtime/vm/virtual_memory.h |
index baa714d96b116516249b0d52242fbd87b9e287ad..4a7ecd27b3d174c835b9024583d78ea972004ed8 100644 |
--- a/runtime/vm/virtual_memory.h |
+++ b/runtime/vm/virtual_memory.h |
@@ -64,9 +64,9 @@ class VirtualMemory { |
// Commit a reserved memory area, so that the memory can be accessed. |
bool Commit(uword addr, intptr_t size, bool is_executable); |
- bool embedder_allocated() const { return embedder_allocated_; } |
+ bool vm_owns_region() const { return vm_owns_region_; } |
- static VirtualMemory* ForExternalPage(void* pointer, uword size); |
+ static VirtualMemory* ForImagePage(void* pointer, uword size); |
private: |
static VirtualMemory* ReserveInternal(intptr_t size); |
@@ -81,7 +81,7 @@ class VirtualMemory { |
: region_(region.pointer(), region.size()), |
reserved_size_(region.size()), |
handle_(handle), |
- embedder_allocated_(false) {} |
+ vm_owns_region_(true) {} |
MemoryRegion region_; |
@@ -93,8 +93,10 @@ class VirtualMemory { |
static uword page_size_; |
- // True for a region provided by the embedder. |
- bool embedder_allocated_; |
+ // False for a part of a snapshot added directly to the Dart heap, which |
+ // belongs to the the embedder and must not be deallocated or have its |
+ // protection status changed by the VM. |
+ bool vm_owns_region_; |
DISALLOW_IMPLICIT_CONSTRUCTORS(VirtualMemory); |
}; |