Mercurial > hg > truffle
comparison src/share/vm/memory/metaspace.cpp @ 14255:e4e941b83466
8031779: Assert in MetaspaceGC is always true
Reviewed-by: jmasa, jwilhelm
author | ehelin |
---|---|
date | Thu, 16 Jan 2014 17:22:35 +0100 |
parents | db1ff6781ab4 |
children | 63a4eb8bcd23 |
comparison
equal
deleted
inserted
replaced
14254:42fcf9b2120e | 14255:e4e941b83466 |
---|---|
1453 return; | 1453 return; |
1454 } | 1454 } |
1455 | 1455 |
1456 // No expansion, now see if we want to shrink | 1456 // No expansion, now see if we want to shrink |
1457 // We would never want to shrink more than this | 1457 // We would never want to shrink more than this |
1458 assert(capacity_until_GC >= minimum_desired_capacity, | |
1459 err_msg(SIZE_FORMAT " >= " SIZE_FORMAT, | |
1460 capacity_until_GC, minimum_desired_capacity)); | |
1458 size_t max_shrink_bytes = capacity_until_GC - minimum_desired_capacity; | 1461 size_t max_shrink_bytes = capacity_until_GC - minimum_desired_capacity; |
1459 assert(max_shrink_bytes >= 0, err_msg("max_shrink_bytes " SIZE_FORMAT, | |
1460 max_shrink_bytes)); | |
1461 | 1462 |
1462 // Should shrinking be considered? | 1463 // Should shrinking be considered? |
1463 if (MaxMetaspaceFreeRatio < 100) { | 1464 if (MaxMetaspaceFreeRatio < 100) { |
1464 const double maximum_free_percentage = MaxMetaspaceFreeRatio / 100.0; | 1465 const double maximum_free_percentage = MaxMetaspaceFreeRatio / 100.0; |
1465 const double minimum_used_percentage = 1.0 - maximum_free_percentage; | 1466 const double minimum_used_percentage = 1.0 - maximum_free_percentage; |