Index: runtime/vm/virtual_memory_android.cc |
diff --git a/runtime/vm/virtual_memory_android.cc b/runtime/vm/virtual_memory_android.cc |
index b7de39be2cfe4771e0efd0079d08dccb02cc083c..0e0c1b23380041e6e9bedcccc65dad76089f3ed0 100644 |
--- a/runtime/vm/virtual_memory_android.cc |
+++ b/runtime/vm/virtual_memory_android.cc |
@@ -53,7 +53,9 @@ static void unmap(void* address, intptr_t size) { |
VirtualMemory::~VirtualMemory() { |
- unmap(address(), reserved_size_); |
+ if (!embedder_allocated()) { |
+ unmap(address(), reserved_size_); |
+ } |
} |