move 32 bit heap hint on sunos
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 25 Jul 2013 08:06:13 +0000 (08:06 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 25 Jul 2013 08:06:13 +0000 (08:06 +0000)
commitf5e6fbef6ebcd5cddf886b8e5012ae564ec9362d
tree3ba6bd06e55858761e7eace2887ad33d6043f61b
parent71c563f8e32700af0650742327ac386292061b34
move 32 bit heap hint on sunos

Setting the V8 heap at or near 0x20000000 on 32bit sunos only allows
512 MB of heap space, instead on sunos move this to 0x80000000.

To quote the comment

For our Solaris/illumos mmap hint, we pick a random address in the bottom
half of the top half of the address space (that is, the third quarter).
Because we do not MAP_FIXED, this will be treated only as a hint -- the
system will not fail to mmap() because something else happens to already
be mapped at our random address. We deliberately set the hint high enough
to get well above the system's break (that is, the heap); Solaris and
illumos will try the hint and if that fails allocate as if there were
no hint at all. The high hint prevents the break from getting hemmed in
at low values, ceding half of the address space to the system heap.

BUG=
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/19859008

Patch from Timothy J. Fontaine <tjfontaine@joyent.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/platform-posix.cc