runtime: Don't ask mmap for wrapping memory.

From-SVN: r180732
This commit is contained in:
Ian Lance Taylor 2011-11-01 05:20:40 +00:00
parent 3d43396098
commit 787f74b487
1 changed files with 2 additions and 0 deletions

View File

@ -358,6 +358,8 @@ runtime_mallocinit(void)
// away from the running binary image and then round up
// to a MB boundary.
want = (byte*)(((uintptr)end + (1<<18) + (1<<20) - 1)&~((1<<20)-1));
if(0xffffffff - (uintptr)want <= bitmap_size + arena_size)
want = 0;
p = runtime_SysReserve(want, bitmap_size + arena_size);
if(p == nil)
runtime_throw("runtime: cannot reserve arena virtual address space");