Skip to content

Commit

Permalink
[windows] Implements FreeSubSegment
Browse files Browse the repository at this point in the history
fixes #27505

R=asiva@google.com

Review URL: https://codereview.chromium.org/2411253002 .
  • Loading branch information
zanderso committed Oct 13, 2016
1 parent 1f373db commit 9c83c38
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions runtime/vm/virtual_memory_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ VirtualMemory::~VirtualMemory() {
return;
}
if (VirtualFree(address(), 0, MEM_RELEASE) == 0) {
FATAL("VirtualFree failed");
FATAL1("VirtualFree failed: Error code %d\n", GetLastError());
}
}


bool VirtualMemory::FreeSubSegment(void* address, intptr_t size) {
// On Windows only the entire segment returned by VirtualAlloc
// can be freed. Therefore we will have to waste these unused
// virtual memory sub-segments.
return false;
if (VirtualFree(address, size, MEM_DECOMMIT) == 0) {
FATAL1("VirtualFree failed: Error code %d\n", GetLastError());
}
return true;
}


Expand Down

0 comments on commit 9c83c38

Please sign in to comment.