32bit windows VM cannot be started with 1GB heap?

Claes Redestad claes.redestad at oracle.com
Tue Dec 13 14:28:45 UTC 2016


Hi Thomas,

do you configure the build with the client or server VM?

The former is not going to be supported by Oracle in JDK 9 and the 
latter is
known to have issues with allocating too many threads and using too much
memory for code cache etc on large machines, effectively starving the
available space for the java heap.

A solution to this is actively being worked on, see 
https://bugs.openjdk.java.net/browse/JDK-8166002

Thanks!

/Claes

On 12/13/2016 02:52 PM, Thomas Stüfe wrote:
> Hi all,
>
> I try to build a 32bit VM (from the jdk9/hs repository) on Windows.
>
> The build fails when it tries to run the freshly built VM during the build:
>
> /cygdrive/c/d031900/openjdk/jdk9-hs2/output-32bit/configure-support/bin/fixpath.exe
> -c /cygdrive/c/d031900/openjdk/jdk9-hs2/output-32bit/jdk/bin/java -Xms64M
> -Xmx1024M -XX:ThreadStackSize=768 -esa -ea -cp
> /cygdrive/c/d031900/openjdk/jdk9-hs2/output-32bit/buildtools/tools_jigsaw_classes
> --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED
> build.tools.jigsaw.ModuleSummary -o
> /cygdrive/c/d031900/openjdk/jdk9-hs2/output-32bit/images/gengraphs/module-summary.html
> --module-path /cygdrive/c/d031900/openjdk/jdk9-hs2/output-32bit/images/jmods
> Error occurred during initialization of VM
> Could not reserve enough space for 1048576KB object heap
>
> Basically, the VM under <output>/jdk cannot be started with 1GB heap. I
> assume the same would be true for the build result VM, but cannot verify
> this as the build does not finish.
>
> Drilling down I found that when trying to allocate the java heap,
> VirtualAlloc fails with ERROR_NOT_ENOUGH_MEMORY.
>
> Drilling further down I found - when looking at the address space with
> VMMap - that there is indeed no adress space hole large enough to hold 1GB.
> But no culprit stands out immediately.
>
> Does anyone else experience similar problems? Would it be ok to reduce the
> -Xmx setting for the 32bit build on windows?
>
> Thank you, Thomas



More information about the hotspot-dev mailing list