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

Unified Diff: runtime/vm/virtual_memory.h

Issue 2654183002: Rename references to "external pages" as "snapshot pages" to avoid confusion with the kind of exter… (Closed)
Patch Set: image Created 3 years, 11 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
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);
};

Powered by Google App Engine
This is Rietveld 408576698