1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Thu May 15 09:25:27 2014 -0400 1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Thu May 15 18:23:26 2014 -0400 1.3 @@ -6363,7 +6363,9 @@ 1.4 verify_overflow_empty(); 1.5 1.6 if (should_unload_classes()) { 1.7 - ClassLoaderDataGraph::purge(); 1.8 + // Delay purge to the beginning of the next safepoint. Metaspace::contains 1.9 + // requires that the virtual spaces are stable and not deleted. 1.10 + ClassLoaderDataGraph::set_should_purge(true); 1.11 } 1.12 1.13 _intra_sweep_timer.stop();