diff a/test/hotspot/jtreg/runtime/testlibrary/ClassUnloadCommon.java b/test/hotspot/jtreg/runtime/testlibrary/ClassUnloadCommon.java --- a/test/hotspot/jtreg/runtime/testlibrary/ClassUnloadCommon.java +++ b/test/hotspot/jtreg/runtime/testlibrary/ClassUnloadCommon.java @@ -60,11 +60,11 @@ l = null; dummy = null; } public static void triggerUnloading() { - allocateMemory(16 * 1024); // yg size is 8m with cms[[keep?]], force young collection + allocateMemory(16 * 1024); // force young collection System.gc(); } /** * Creates a class loader that loads classes from {@code ${test.class.path}}