RFR: 8254739: G1: Optimize evacuation failure for regions with few failed objects [v19]
mli at openjdk.java.net
Fri Nov 5 10:38:13 UTC 2021
On Fri, 5 Nov 2021 09:39:46 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>> Move allocation/deallocation in one place
> src/hotspot/share/gc/g1/g1EvacFailureObjectsSet.cpp line 131:
>> 130: _offsets.drop_all();
>> 131: }
> Having some destructive operations (`drop_all`) inside a method named `iterate` could come as a surprise, IMO. If I understand this correctly, the following would be problematic.
drop_all just returns buffers to free list, it will not destruct the buffers. So, iterate multiple times is OK, because next time it will get memory from free list or allocate a new buffer. Hope this answer your question.
More information about the hotspot-gc-dev