On Wed, 18 Nov 2026 10:09:58 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. >> >> I think your observation captures well how fundamentally broken this >> mechanism is. >> >> The engineering alternatives are determined by what yields the smallest >> memory footprint, including explicit, intentional memory leaks. > > 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. It is some extra complexity and a little bit ugly that we use different bookkeeping policy before and after retransformation. At least, this needs to be well commented. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/33921#discussion_r4612782427
