Sill question

Kirk Pepperdine kirk at kodewerk.com
Wed Dec 19 06:06:09 UTC 2012


Hi Kris,

Interesting indeed. It doesn't quite explain why I can't get a 32 bit 1.5 JVM to give me a heap 1 byte bigger than 1g. But, interesting indeed!

-- Kirk

On 2012-12-19, at 4:48 AM, Krystal Mok <rednaxelafx at gmail.com> wrote:

> Hi Kirk,
> 
> Does this stack trace help you?
> 
> #0  os::attempt_reserve_memory_at (bytes=2149580800,
> requested_addr=0x77fe00000 <Address 0x77fe00000 out of bounds>)
>    at /media/Data/build/hotspot-comp/hotspot/src/os/linux/vm/os_linux.cpp:3185
> #1  0x00007ffff6de3ca0 in ReservedSpace::ReservedSpace
> (this=0x7ffff7fd69d0, prefix_size=<value optimized out>,
> prefix_align=65536,
>    suffix_size=<value optimized out>, suffix_align=<value optimized out>,
>    requested_address=0x77fe00000 <Address 0x77fe00000 out of bounds>,
> noaccess_prefix=0)
>    at /media/Data/build/hotspot-comp/hotspot/src/share/vm/runtime/virtualspace.cpp:205
> #2  0x00007ffff6de40a0 in ReservedHeapSpace::ReservedHeapSpace
> (this=0x7ffff7fd69d0, prefix_size=85983232, prefix_align=2063597568,
>    suffix_size=2063597568, suffix_align=65536,
> requested_address=0x77fe00000 <Address 0x77fe00000 out of bounds>)
>    at /media/Data/build/hotspot-comp/hotspot/src/share/vm/runtime/virtualspace.cpp:506
> #3  0x00007ffff6bfea1a in ParallelScavengeHeap::initialize (this=0x61de68)
>    at /media/Data/build/hotspot-comp/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp:141
> #4  0x00007ffff6daf0a6 in Universe::initialize_heap () at
> /media/Data/build/hotspot-comp/hotspot/src/share/vm/memory/universe.cpp:925
> #5  0x00007ffff6daf568 in universe_init () at
> /media/Data/build/hotspot-comp/hotspot/src/share/vm/memory/universe.cpp:782
> #6  0x00007ffff68a16ea in init_globals () at
> /media/Data/build/hotspot-comp/hotspot/src/share/vm/runtime/init.cpp:100
> #7  0x00007ffff6d8e582 in Threads::create_vm (args=<value optimized
> out>, canTryAgain=0x7ffff7fd6daf)
>    at /media/Data/build/hotspot-comp/hotspot/src/share/vm/runtime/thread.cpp:3220
> #8  0x00007ffff691ee0e in JNI_CreateJavaVM (vm=0x7ffff7fd6e78,
> penv=0x7ffff7fd6e70, args=0x7ffff7fd6e50)
>    at /media/Data/build/hotspot-comp/hotspot/src/share/vm/prims/jni.cpp:5131
> #9  0x00007ffff79ac1b7 in JavaMain () from
> /media/Data/build/testjdk7u1/bin/../jre/lib/amd64/jli/libjli.so
> #10 0x00007ffff7bc6971 in start_thread (arg=<value optimized out>) at
> pthread_create.c:304
> #11 0x00007ffff7507f3d in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
> #12 0x0000000000000000 in ?? ()
> 
> (BTW this stack trace is from a build of somewhat old version of JDK7,
> not from the latest hotspot-comp)
> 
> The place to look for is the Universe::heap()->initialize() call in
> Universe::initialize_heap(), that's the high-level entry point of
> where the GC heap is reserved. The code in init_globals() in
> hotspot/src/share/vm/runtime/init.cpp and Threads::create_vm() in
> hotspot/src/share/vm/runtime/thread.cpp should give you what you need.
> 
> - Kris
> 
> On Wed, Dec 19, 2012 at 4:38 AM, Kirk Pepperdine <kirk at kodewerk.com> wrote:
>> Hi,
>> 
>> I have a silly question that I'd like to ask here before digging into the code. When in the startup sequence of the JVM does Java Heap get reserved/allocated?
>> 
>> TIA,
>> Kirk




More information about the hotspot-gc-dev mailing list