RFR(S) 8148944: CollectorPolicy methods for memory allocations are specific to GenCollectorPolicy
Mikael Gerdin
mikael.gerdin at oracle.com
Wed Feb 3 18:40:28 UTC 2016
Hi,
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.
Thanks
/Mikael
More information about the hotspot-gc-dev
mailing list