mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-17 17:07:53 +00:00
8285710: Miscalculation of G1CardSetAllocator unused memory size
Reviewed-by: tschatzl, ayang
This commit is contained in:
parent
1ca540460c
commit
9835678a86
@ -61,9 +61,8 @@ size_t G1CardSetAllocator::mem_size() const {
|
||||
}
|
||||
|
||||
size_t G1CardSetAllocator::unused_mem_size() const {
|
||||
uint num_unused_slots = _segmented_array.num_total_slots() -
|
||||
_segmented_array.num_allocated_slots() -
|
||||
(uint)_free_slots_list.pending_count();
|
||||
uint num_unused_slots = (_segmented_array.num_total_slots() - _segmented_array.num_allocated_slots()) +
|
||||
(uint)_free_slots_list.free_count();
|
||||
return num_unused_slots * _segmented_array.slot_size();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user