On Tue, 21 Apr 2026 04:43:50 GMT, Kirill Shirokov <[email protected]> wrote:
>> SendaoYan has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> 1. Merge two goldAlot.clear/System.gc; 2. Use while(!finalizaRun) instead
>> of while(true)
>
> test/jdk/com/sun/jdi/FinalizerTest.java line 99:
>
>> 97: }
>> 98: try {
>> 99: while(true) {
>
> Would `while (!finalizerRun) {` work here? It could save some execution time
> if the BigObject finalized earlier.
Fixed.
> test/jdk/com/sun/jdi/FinalizerTest.java line 108:
>
>> 106: System.gc();
>> 107: }
>> 108: holdAlot.clear();
>
> Probably, the both `holdAlot.clear(); System.gc();` can be put into `finally
> {...}` section (unless you intentionally call it twice in case of OOME).
Thanks. I think we can merge those clear() and gc(). Fixed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30829#discussion_r3115341961
PR Review Comment: https://git.openjdk.org/jdk/pull/30829#discussion_r3115334165