Review request (XS): JDK-8009282: Assertion "assert(used_and_free == capacity_bytes) failed: Accounting is wrong" failed with -XX:+Verbose -XX:+TraceMetadataChunkAllocation
stefan.karlsson at oracle.com
Mon Mar 11 06:39:30 PDT 2013
On 03/11/2013 02:12 PM, Mikael Gerdin wrote:
> Please review this small fix for an incorrect assert that can trigger
> when we run out of metaspace memory.
> The reasoning behind this change is that when running with the command
> line flags specified in the bug report we call MetaspaceAux::print_on
> when we're about to throw an j.l.OutOfMemoryError. At that point
> another thread may be successful in allocating metaspace memory in
> another class loader or smaller memory chunks which are available.
> The assert condition must only hold when the VM is at a safe point and
> no other thread may be allocating metaspace memory.
More information about the hotspot-gc-dev