On Wed, 18 Nov 2026 10:58:35 GMT, Serguei Spitsyn <[email protected]> wrote:

>> 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.

Ugly is what the underlying implementation is.

It forces a memory leak onto the user, and an engineer trying to fix that must 
take into account if the intentional memory leak is warranted, because the 
alternative to having a memory leak might be worse.

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

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

Reply via email to