hotspot/src/share/vm/memory/metaspace.cpp
changeset 15954 fbcf5f5047c6
parent 15610 528d799702c7
child 15960 674d0586183f
child 16385 4a05c6d94b04
--- a/hotspot/src/share/vm/memory/metaspace.cpp	Mon Mar 11 15:37:10 2013 +0100
+++ b/hotspot/src/share/vm/memory/metaspace.cpp	Tue Mar 12 09:42:24 2013 +0100
@@ -2440,7 +2440,8 @@
              free_chunks_capacity_bytes / K,
              used_and_free / K,
              capacity_bytes / K);
-  assert(used_and_free == capacity_bytes, "Accounting is wrong");
+  // Accounting can only be correct if we got the values during a safepoint
+  assert(!SafepointSynchronize::is_at_safepoint() || used_and_free == capacity_bytes, "Accounting is wrong");
 }
 
 // Print total fragmentation for class and data metaspaces separately