-
Enhancement
-
Resolution: Fixed
-
P4
-
19
-
b15
In `PSPromotionManager::copy_unmarked_to_survivor_space`, when a thread loses the CAS race, it will try to deallocate the space:
```
if (new_obj_is_tenured) {
if (!_old_lab.unallocate_object(...)) {
fill_with_obj(...);
}
} else {
if (!_young_lab.unallocate_object(...)) {
fill_with_obj(...);
}
}
```
The "filler object" logic is irrelevant to the current context and makes more sense inside `unallocate_object`. For example, `PLAB::undo_allocation` contains the filler object logic.
```
if (new_obj_is_tenured) {
if (!_old_lab.unallocate_object(...)) {
fill_with_obj(...);
}
} else {
if (!_young_lab.unallocate_object(...)) {
fill_with_obj(...);
}
}
```
The "filler object" logic is irrelevant to the current context and makes more sense inside `unallocate_object`. For example, `PLAB::undo_allocation` contains the filler object logic.