diff src/share/vm/memory/compactingPermGenGen.cpp @ 271:818a18cd69a8

6730514: assertion failure in mangling code when expanding by 0 bytes Summary: An expansion by 0 bytes was not anticipated when the assertion was composed. Reviewed-by: jjh, jcoomes, apetrusenko
author jmasa
date Wed, 30 Jul 2008 11:54:00 -0700
parents d1605aabd0a1
children 5251a9cd8eb8
line wrap: on
line diff
--- a/src/share/vm/memory/compactingPermGenGen.cpp	Mon Jul 28 15:30:23 2008 -0700
+++ b/src/share/vm/memory/compactingPermGenGen.cpp	Wed Jul 30 11:54:00 2008 -0700
@@ -432,14 +432,16 @@
 }
 
 
-void CompactingPermGenGen::grow_to_reserved() {
+bool CompactingPermGenGen::grow_to_reserved() {
   // Don't allow _virtual_size to expand into shared spaces.
+  bool success = false;
   if (_virtual_space.uncommitted_size() > _shared_space_size) {
     size_t remaining_bytes =
       _virtual_space.uncommitted_size() - _shared_space_size;
-    bool success = OneContigSpaceCardGeneration::grow_by(remaining_bytes);
+    success = OneContigSpaceCardGeneration::grow_by(remaining_bytes);
     DEBUG_ONLY(if (!success) warning("grow to reserved failed");)
   }
+  return success;
 }