comparison src/share/vm/memory/compactingPermGenGen.cpp @ 291:5251a9cd8eb8 jdk7-b34

6742207: jdk7 32-bit windows build failed running pack200 Summary: 6730514 inadvertently disabled perm gen expansion; reenable Reviewed-by: ysr
author jcoomes
date Wed, 27 Aug 2008 15:41:58 -0700
parents 818a18cd69a8
children 26f1542097f1
comparison
equal deleted inserted replaced
290:9f7cf8db35b8 291:5251a9cd8eb8
419 return OneContigSpaceCardGeneration::max_capacity() 419 return OneContigSpaceCardGeneration::max_capacity()
420 - _shared_space_size; 420 - _shared_space_size;
421 } 421 }
422 422
423 423
424
425 bool CompactingPermGenGen::grow_by(size_t bytes) {
426 // Don't allow _virtual_size to expand into shared spaces.
427 size_t max_bytes = _virtual_space.uncommitted_size() - _shared_space_size;
428 if (bytes > _shared_space_size) {
429 bytes = _shared_space_size;
430 }
431 return OneContigSpaceCardGeneration::grow_by(bytes);
432 }
433
434
435 bool CompactingPermGenGen::grow_to_reserved() {
436 // Don't allow _virtual_size to expand into shared spaces.
437 bool success = false;
438 if (_virtual_space.uncommitted_size() > _shared_space_size) {
439 size_t remaining_bytes =
440 _virtual_space.uncommitted_size() - _shared_space_size;
441 success = OneContigSpaceCardGeneration::grow_by(remaining_bytes);
442 DEBUG_ONLY(if (!success) warning("grow to reserved failed");)
443 }
444 return success;
445 }
446
447
448 // No young generation references, clear this generation's main space's 424 // No young generation references, clear this generation's main space's
449 // card table entries. Do NOT clear the card table entries for the 425 // card table entries. Do NOT clear the card table entries for the
450 // read-only space (always clear) or the read-write space (valuable 426 // read-only space (always clear) or the read-write space (valuable
451 // information). 427 // information).
452 428