test/gc/metaspace/TestCapacityUntilGCWrapAround.java
Print this page
rev 7145 : 8049599: MetaspaceGC::_capacity_until_GC can overflow (02)
@@ -45,10 +45,11 @@
public static void main(String[] args) {
if (Platform.is32bit()) {
WhiteBox wb = WhiteBox.getWhiteBox();
long before = wb.metaspaceCapacityUntilGC();
+ // Now force possible overflow of capacity_until_GC.
long after = wb.incMetaspaceCapacityUntilGC(MAX_UINT);
Asserts.assertGTE(after, before,
"Increasing with MAX_UINT should not cause wrap around: " + after + " < " + before);
Asserts.assertLTE(after, MAX_UINT,