diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-01 05:20:40 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-01 05:20:40 +0000 |
commit | e8c738ce09f392714aaf0f19cd05a9369740b9d2 (patch) | |
tree | a371b546ba8d1ccc9322e424abc0ddb0fee68fd8 | |
parent | 003e818fd63500770940873d8ccc48d6bbdea5f5 (diff) | |
download | gcc-e8c738ce09f392714aaf0f19cd05a9369740b9d2.tar.gz |
runtime: Don't ask mmap for wrapping memory.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180732 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libgo/runtime/malloc.goc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libgo/runtime/malloc.goc b/libgo/runtime/malloc.goc index f8d4327d690..66f5bda66c0 100644 --- a/libgo/runtime/malloc.goc +++ b/libgo/runtime/malloc.goc @@ -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"); |