--- old/test/hotspot/gtest/memory/test_metaspace_allocation.cpp 2019-12-03 19:37:41.000000000 -0800 +++ new/test/hotspot/gtest/memory/test_metaspace_allocation.cpp 2019-12-03 19:37:41.000000000 -0800 @@ -102,9 +102,9 @@ _spaces[i].lock = new Mutex(Monitor::native, "gtest-MetaspaceAllocationTest-lock", false, Monitor::_safepoint_check_never); ASSERT_TRUE(_spaces[i].lock != NULL); } - // Let every ~10th space be an unsafe anonymous one to test different allocation patterns. + // Let every ~10th space be a short-lived one to test different allocation patterns. const Metaspace::MetaspaceType msType = (os::random() % 100 < 10) ? - Metaspace::UnsafeAnonymousMetaspaceType : Metaspace::StandardMetaspaceType; + Metaspace::ShortLivedMetaspaceType : Metaspace::StandardMetaspaceType; { // Pull lock during space creation, since this is what happens in the VM too // (see ClassLoaderData::metaspace_non_null(), which we mimick here).