RFR(S) 8148944: CollectorPolicy methods for memory allocations are specific to GenCollectorPolicy
jesper.wilhelmsson at oracle.com
Wed Feb 3 19:10:20 UTC 2016
Den 3/2/16 kl. 19:40, skrev Mikael Gerdin:
> Please review this small cleanup to reduce the public API of CollectorPolicy.
> CollectorPolicy::mem_allocate_work and satisfy_failed_allocation are pure
> virtuals on CollectorPolicy but are only used by
> GenCollectorPolicy/GenCollectedHeap. The other collectors stub the methods out
> with fatal errors if they are called.
> My fix is to move the methods to GenCollectorPolicy and let GenCollectedHeap
> access them through its typed pointer to the Gen policy.
> I've also taken the opportunity to remove the "virtual" keyword from
> satsfy_failed_metadata_allocation(), it has never been overridden by any
> CollectorPolicy subclass. If that is desirable then it can easily be reinstated.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8148944
> Webrev: http://cr.openjdk.java.net/~mgerdin/8148944/webrev.0/
> Testing: Just a local build and testing with GCBasher.
More information about the hotspot-gc-dev