Free space calculation of heap

Srinivas Ramakrishna ysr1729 at gmail.com
Fri Jun 1 16:33:10 PDT 2012


On Fri, Jun 1, 2012 at 2:02 PM, Jon Masamitsu <jon.masamitsu at oracle.com>wrote:

>
>
> On 6/1/2012 12:10 PM, Srinivas Ramakrishna wrote:
> > ...
> >> q2: all counter of the BinaryTreeDictionary and  IndexedFreeLists of
> perm
> >> gen is zero, why?
> >>
> > The perm gen allocation patterns were sufficiently simple that a linearly
> > allocated single slab of space
> > was used instead of free lists, with the idea that the "holes" from
> freeing
> > up of class objects in the perm
> > gen would not reclaim much usable space. This is probably worth revising
> > with all of the perm gen objects
> > that will be constantly created and reclaimed with dynamic languages
> > running atop the JVM. Jon may
> > recall the details of why it was done that way. Much of this will anyway
> > change under the new perm gen
> > allocation regime, where the perm gen has been moved out of the "Java
> heap"
> > into the "native heap", so
> > probably not worth worrying about any more.
>
> I recall that the perm gen used the linear allocation blocks without
> adaptive free lists.
> I would have thought that would still produce lists of free blocks.
> CMSPermGen
> does use the compactibleFreeListSpace allocate().  Part of the reason the
> linear allocation block is used  to keep the needed left to right
> allocation order of the
> klasses in the perm gen.
>

ah, i now recall the order thing. Thanks for the reminder!

You are right that if the perm gen were collected and swept by CMS this
would pick up
the freed up holes into the free lists. Thanks for correcting!

I suppose the empty free lists there in Bond's snippet then indicate that
no concurrent collection of the
perm gen has happened in that run since the most recent previous stop-world
compacting
collection (which would empty the free lists and return it all to a single
free block at the end).

-- ramki


>
> Jon
>
> >
> _______________________________________________
> hotspot-gc-use mailing list
> hotspot-gc-use at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20120601/9f2e9058/attachment-0001.html 


More information about the hotspot-gc-use mailing list