hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
changeset 24457 0e20b36df5c4
parent 24429 4efc66ee325c
child 24845 e8b8894a77df
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Thu May 15 17:38:50 2014 -0400
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Thu May 15 18:23:26 2014 -0400
@@ -6362,7 +6362,9 @@
   verify_overflow_empty();
 
   if (should_unload_classes()) {
-    ClassLoaderDataGraph::purge();
+    // Delay purge to the beginning of the next safepoint.  Metaspace::contains
+    // requires that the virtual spaces are stable and not deleted.
+    ClassLoaderDataGraph::set_should_purge(true);
   }
 
   _intra_sweep_timer.stop();