6423256: marking stacks should use a chunked data structure
Keith.McGuigan at Sun.COM
Wed Nov 5 17:08:48 UTC 2008
Hi Scott -
I'm forwarding this to the hotspot-gc-dev mailing list. If anyone is
working on it, they'll be on that list (maybe this one too, but just in
Scott Marlow wrote:
> Is anyone working on this bug yet? From the bug report
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6423256, it sounds
> like someone started the work already. I would like to help with the
> issue (either testing a proposed fix or submitting one).
> The bug report contains this text:
> The marking stack used by MarkSweep currently uses a GrowableArray<oop>.
> That's overkill, since we only use the marking stack as a stack. In
> contrast, GrowableArray implements an array, so when it expands, it
> reallocs and copies the whole array to a new, larger, piece of
> contiguous memory. Since the marking stack is often large, this often
> requires a large contiguous chunk of memory, which can be difficult to
> acquire. Since GrowableArray grows by doubling, on average 25% of the
> array will be empty. When the marking stack is large, this can be a
> substantial waste of space.
> Instead, the stack could be implemented as a chained series of small
> regions. This could allow us to balance the storage for the chain
> pointers against the increment of growth, to use an appropriate amount
> of space in modest chunks.
> Posted Date : 2006-05-08 23:47:21.0
More information about the hotspot-gc-dev