6423256: marking stacks should use a chunked data structure
Scott Marlow
scott.marlow.opensource at gmail.com
Wed Nov 5 08:56:42 PST 2008
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
"
Scott
More information about the hotspot-runtime-dev
mailing list