-XX:+MaximizeHeapSize?
Florian Weimer
fw at deneb.enyo.de
Wed Jul 11 19:33:09 UTC 2007
* Jon Masamitsu:
> Yes, hotspot does do a reserve of a continuous address space for the
> entire heap at initialization with an mmap call using
>
> MAP_PRIVATE | MAP_NORESERVE | MAP_ANONYMOUS
>
> As the heap is actually expanded the space is mmap'ed with
>
> MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS
>
> so it can actually be used. See the reserve_memory() and
> commit_memory() methods
> in os/linux/vm/os_linux.cpp for the details.
This is not sufficient in vm.overcommit_memory = 2 mode. Without
PROT_NONE, the allocation still counts against the beancounter limit.
Perhaps this is a kernel bug, but is has been this way for quite some
time.
More information about the hotspot-gc-dev
mailing list