comparison 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
comparison
equal deleted inserted replaced
269:850fdf70db2b 271:818a18cd69a8
430 } 430 }
431 return OneContigSpaceCardGeneration::grow_by(bytes); 431 return OneContigSpaceCardGeneration::grow_by(bytes);
432 } 432 }
433 433
434 434
435 void CompactingPermGenGen::grow_to_reserved() { 435 bool CompactingPermGenGen::grow_to_reserved() {
436 // Don't allow _virtual_size to expand into shared spaces. 436 // Don't allow _virtual_size to expand into shared spaces.
437 bool success = false;
437 if (_virtual_space.uncommitted_size() > _shared_space_size) { 438 if (_virtual_space.uncommitted_size() > _shared_space_size) {
438 size_t remaining_bytes = 439 size_t remaining_bytes =
439 _virtual_space.uncommitted_size() - _shared_space_size; 440 _virtual_space.uncommitted_size() - _shared_space_size;
440 bool success = OneContigSpaceCardGeneration::grow_by(remaining_bytes); 441 success = OneContigSpaceCardGeneration::grow_by(remaining_bytes);
441 DEBUG_ONLY(if (!success) warning("grow to reserved failed");) 442 DEBUG_ONLY(if (!success) warning("grow to reserved failed");)
442 } 443 }
444 return success;
443 } 445 }
444 446
445 447
446 // No young generation references, clear this generation's main space's 448 // No young generation references, clear this generation's main space's
447 // card table entries. Do NOT clear the card table entries for the 449 // card table entries. Do NOT clear the card table entries for the