| Index: runtime/vm/virtual_memory_linux.cc
|
| diff --git a/runtime/vm/virtual_memory_linux.cc b/runtime/vm/virtual_memory_linux.cc
|
| index 47587524b9a86c5869ad180ce0cd503a23849810..fa14d59eedd9bb29582c149e1835b8567d7348c3 100644
|
| --- a/runtime/vm/virtual_memory_linux.cc
|
| +++ b/runtime/vm/virtual_memory_linux.cc
|
| @@ -24,12 +24,10 @@ namespace dart {
|
|
|
| uword VirtualMemory::page_size_ = 0;
|
|
|
| -
|
| void VirtualMemory::InitOnce() {
|
| page_size_ = getpagesize();
|
| }
|
|
|
| -
|
| VirtualMemory* VirtualMemory::ReserveInternal(intptr_t size) {
|
| void* address = mmap(NULL, size, PROT_NONE,
|
| MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, -1, 0);
|
| @@ -40,7 +38,6 @@ VirtualMemory* VirtualMemory::ReserveInternal(intptr_t size) {
|
| return new VirtualMemory(region);
|
| }
|
|
|
| -
|
| static void unmap(void* address, intptr_t size) {
|
| if (size == 0) {
|
| return;
|
| @@ -51,14 +48,12 @@ static void unmap(void* address, intptr_t size) {
|
| }
|
| }
|
|
|
| -
|
| VirtualMemory::~VirtualMemory() {
|
| if (vm_owns_region()) {
|
| unmap(address(), reserved_size_);
|
| }
|
| }
|
|
|
| -
|
| bool VirtualMemory::FreeSubSegment(int32_t handle,
|
| void* address,
|
| intptr_t size) {
|
| @@ -66,7 +61,6 @@ bool VirtualMemory::FreeSubSegment(int32_t handle,
|
| return true;
|
| }
|
|
|
| -
|
| bool VirtualMemory::Commit(uword addr,
|
| intptr_t size,
|
| bool executable,
|
| @@ -82,7 +76,6 @@ bool VirtualMemory::Commit(uword addr,
|
| return true;
|
| }
|
|
|
| -
|
| bool VirtualMemory::Protect(void* address, intptr_t size, Protection mode) {
|
| ASSERT(Thread::Current()->IsMutatorThread() ||
|
| Isolate::Current()->mutator_thread()->IsAtSafepoint());
|
| @@ -111,7 +104,6 @@ bool VirtualMemory::Protect(void* address, intptr_t size, Protection mode) {
|
| end_address - page_address, prot) == 0);
|
| }
|
|
|
| -
|
| } // namespace dart
|
|
|
| #endif // defined(HOST_OS_LINUX)
|
|
|