Index: runtime/vm/virtual_memory.h |
=================================================================== |
--- runtime/vm/virtual_memory.h (revision 41212) |
+++ runtime/vm/virtual_memory.h (working copy) |
@@ -60,9 +60,14 @@ |
static bool InSamePage(uword address0, uword address1); |
- // Truncate this virtual memory segment. |
+ // Truncate this virtual memory segment. If try_unmap is false, the |
+ // memory beyond the new end is still accessible, but will be returned |
+ // upon destruction. |
void Truncate(intptr_t new_size, bool try_unmap = true); |
+ // Commit a reserved memory area, so that the memory can be accessed. |
+ bool Commit(uword addr, intptr_t size, bool is_executable); |
+ |
private: |
static VirtualMemory* ReserveInternal(intptr_t size); |
@@ -76,9 +81,6 @@ |
region_(region.pointer(), region.size()), |
reserved_size_(region.size()) { } |
- // Commit a reserved memory area, so that the memory can be accessed. |
- bool Commit(uword addr, intptr_t size, bool is_executable); |
- |
MemoryRegion region_; |
// The size of the underlying reservation not yet given back to the OS. |