Commit dd50dac5 authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

runtime: fix windows build

R=golang-dev
CC=golang-dev
https://golang.org/cl/12941043
parent 4e76abbc
......@@ -32,17 +32,17 @@ runtime·SysAlloc(uintptr n)
void
runtime·SysUnused(void *v, uintptr n)
{
uintptr r;
void *r;
r = runtime·stdcall(runtime·VirtualFree, 3, v, n, (uintptr)MEM_DECOMMIT);
if(r == 0)
if(r == nil)
runtime·throw("runtime: failed to decommit pages");
}
void
runtime·SysUsed(void *v, uintptr n)
{
uintptr r;
void *r;
r = runtime·stdcall(runtime·VirtualAlloc, 4, v, n, (uintptr)MEM_COMMIT, (uintptr)PAGE_READWRITE);
if(r != v)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment