On Wed, 18 Nov 2026 09:52:34 GMT, Markus Grönlund <[email protected]> wrote:

>> But based on that previous discussion it seems the strong link is not 
>> actually needed to keep them alive, but rather the strong link is preferred 
>> because "the main issue if the link is not STRONG is that the VM creates one 
>> classloader data per lambda as Mandy said, ". So it would seem you are going 
>> to use more C heap transiently to allow you to reclaim more C heap later.
>
>> But based on that previous discussion it seems the strong link is not 
>> actually needed to keep them alive, but rather the strong link is preferred 
>> because "the main issue if the link is not STRONG is that the VM creates one 
>> classloader data per lambda as Mandy said, ". So it would seem you are going 
>> to use more C heap transiently to allow you to reclaim more C heap later.
> 
> I think your observation captures well how fundamentally broken this 
> mechanism is.
> 
> The engineering alternatives are determined by what results in the least 
> amount of memory leakage.

Yes, independent unloading introduces further per-class bookkeeping. However, 
it allows both bookkeeping data and implementation metadata no longer in use to 
be reclaimed. With strong loader linkage, repeated retransformations accumulate 
many obsolete generations over the loader's lifetime. This change adds overhead 
after retransformation, but since strong loader linkage is kept for the default 
case,  the footprint optimization described by Mandy is unaffected.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/33921#discussion_r4612178145

Reply via email to