Index: runtime/vm/virtual_memory_linux.cc |
diff --git a/runtime/vm/virtual_memory_linux.cc b/runtime/vm/virtual_memory_linux.cc |
index 26e38c778f7ec154ab9d20684354a78802189115..275c0c68abd44ff8b50100455ebc06907ff6d8e5 100644 |
--- a/runtime/vm/virtual_memory_linux.cc |
+++ b/runtime/vm/virtual_memory_linux.cc |
@@ -52,7 +52,9 @@ static void unmap(void* address, intptr_t size) { |
VirtualMemory::~VirtualMemory() { |
- unmap(address(), reserved_size_); |
+ if (!embedder_allocated()) { |
+ unmap(address(), reserved_size_); |
+ } |
} |