RFR (S): 8058446: G1 Hot card cache should use ArrayAllocator to allocate the cache array
thomas.schatzl at oracle.com
Tue Feb 17 15:18:15 UTC 2015
can I have reviews for this small change (or feedback): it changes the
hot card cache array that holds the hot cards from always using C heap
to an ArrayAllocator.
This is because the hot card cache may be specified to be quite large
(up to 2^31 entries), which will result in native OOME at startup.
The fix is to use an ArrayAllocator for larger hot card caches.
Another potential improvement would be to decrease the maximum allowed
HCC size to something more reasonable - however I have no idea what this
size could be.
One comment in the CR suggests to add a test that adds testing of the
boundary values. However, I do not see how you could create a stable
test for that, given that that test would somehow need to guess a
maximum reasonable value to not crash on any machines.
I left a test out for now as the change itself is pretty simple.
A few values are already checked in the TestAuxiliaryData* tests too.
More information about the hotspot-gc-dev