`G1CalculatePointersClosure::free_humongous_region` uses a dummy list on calling `free_humongous_region`.
```
_g1h->free_humongous_region(hr, &dummy_free_list);
prepare_for_compaction(hr);
dummy_free_list.remove_all();
```
Usually, we use this list to collect reclaimed regions, which are added to the region free list.
However, in a Full GC, we don't construct the free list; instead , the whole heap (except some special regions) is compacted. Therefore, we can remove remove this dummy list; using `nullptr` as the argument. The same arguement goes for `free_open_archive_region` right below.
```
_g1h->free_humongous_region(hr, &dummy_free_list);
prepare_for_compaction(hr);
dummy_free_list.remove_all();
```
Usually, we use this list to collect reclaimed regions, which are added to the region free list.
However, in a Full GC, we don't construct the free list; instead , the whole heap (except some special regions) is compacted. Therefore, we can remove remove this dummy list; using `nullptr` as the argument. The same arguement goes for `free_open_archive_region` right below.
- duplicates
-
JDK-8265434 Remove dummy lists in G1CalculatePointersClosure
-
- Closed
-