About the location of data structure and its inner objects
thomas.schatzl at oracle.com
Wed Aug 28 06:32:28 PDT 2013
On Wed, 2013-08-28 at 16:42 +0800, Krystal Mok wrote:
> Hi Lijie,
> On Wed, Aug 28, 2013 at 10:46 AM, Lijie Xu <csxulijie at gmail.com>
> Thank Tao, I think I have a graph of memory layout now. I have
> another five questions:
> 1) Can old space's max size be adjusted dynamically by GC
> while the JVM is running?
> Yes if you're using UseParallelGC / UseParallelOldGC and
> UseAdaptiveSizePolicy is on (it is on by default). Other GCs in
> HotSpot don't implement adaptive size policy yet.
G1 too: In G1 the old gen is simply what is left over from the young gen
mostly sized by pause time and total available memory.
> 3) Whether MinorGC can copy an object directly into Old if the
> Survior hasn't enough space to hold it currently?
> Yes, it could. That would be called a "premature promotion" /
> "survivor space overflow".
> It is even possible to directly allocate a new object in the old
> generation. Assuming you can read Chinese, refer to this thread for an
> example: http://hllvm.group.iteye.com/group/topic/38293
This typically affects very large objects (large depending on the
collector, e.g. too large to fit into the young generation). They are
allocated directly into the old generation.
More information about the hotspot-gc-dev