diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.cpp index 5f944d1ecfe5fe506c06a4d279dfa7eb038dbdd0..d382c305916706b0943bbfc3c6b9f8a5f9ddb0b1 100644 --- a/src/share/vm/memory/metaspace.cpp +++ b/src/share/vm/memory/metaspace.cpp @@ -3390,6 +3390,8 @@ void Metaspace::initialize(Mutex* lock, MetaspaceType type) { if (using_class_space()) { // Allocate SpaceManager for classes. _class_vsm = new SpaceManager(ClassType, lock); + } else { + _class_vsm = NULL; } MutexLockerEx cl(SpaceManager::expand_lock(), Mutex::_no_safepoint_check_flag);