mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 12:34:32 +02:00
6730514: assertion failure in mangling code when expanding by 0 bytes
An expansion by 0 bytes was not anticipated when the assertion was composed. Reviewed-by: jjh, jcoomes, apetrusenko
This commit is contained in:
parent
b8633a3b01
commit
74b3de5c3b
9 changed files with 87 additions and 53 deletions
|
@ -432,14 +432,16 @@ bool CompactingPermGenGen::grow_by(size_t bytes) {
|
|||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue