Index: src/platform-openbsd.cc |
diff --git a/src/platform-openbsd.cc b/src/platform-openbsd.cc |
index 973329b9b109b3b145444e6a3a9dc650ba659d1b..3151d18053c0cb6b3442d72aeccde5f41e7ea227 100644 |
--- a/src/platform-openbsd.cc |
+++ b/src/platform-openbsd.cc |
@@ -245,7 +245,7 @@ OS::MemoryMappedFile* OS::MemoryMappedFile::create(const char* name, int size, |
PosixMemoryMappedFile::~PosixMemoryMappedFile() { |
- if (memory_) munmap(memory_, size_); |
+ if (memory_) OS::Free(memory_, size_); |
fclose(file_); |
} |
@@ -342,7 +342,8 @@ VirtualMemory::VirtualMemory(size_t size) { |
VirtualMemory::~VirtualMemory() { |
if (IsReserved()) { |
- if (0 == munmap(address(), size())) address_ = MAP_FAILED; |
+ OS::Free(address(), size()); |
+ address_ = MAP_FAILED |
} |
} |