runtime: fix windows build

R=golang-dev
CC=golang-dev
https://golang.org/cl/12941043
This commit is contained in:
Dmitriy Vyukov 2013-08-14 22:18:49 +04:00
parent 4e76abbc60
commit dd50dac56c
1 changed files with 3 additions and 3 deletions

View File

@ -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)