[Vm-dev] Ephemerons support in VM

Guille Polito guillermopolito at gmail.com
Tue Apr 12 07:45:35 UTC 2016


Hi Eliot, list,

What is the state of Ephemeron support in the VM? I see that in Pharo we 
already have modified the class builder to produce ephemeric classes, 
but there is none yet :).

The thing is that we spent last week here at RMoD chasing a memory leak 
that made tools remain in memory indefinitely due to some bad 
assumptions on how to use weak objects :).

In short: Announcements use finalizers/executors that hold (indirectly) 
strong references to weak keys. And this is aggravated because this 
happens in chains/cycles among several finalizers/executors.
Eg. executor1 points to weakkey2, executor2 points to weakkey3 and so on...

Besides forcing some rules of usage of announcers (and weak announcers), 
we believe part of this problem would be solved by ephemerons.

Thanks for some pointers!
Guille & Pavel


More information about the Vm-dev mailing list