[Haskell-cafe] Top Level <-

Ganesh Sittampalam ganesh at earth.li
Fri Sep 5 15:34:17 EDT 2008

On Fri, 5 Sep 2008, Ashley Yakeley wrote:

> Sittampalam, Ganesh wrote:
>> Ashley Yakeley wrote:
>>> I really don't know enough about the RTS to know. The alternative 
>>> would be to keep all initialised values when the module is unloaded. 
>>> I'm guessing this is more feasible.
>> Easier, but a guaranteed memory leak.
> But it's limited to the initialisers. An IORef holding an Integer isn't 
> much memory, and it only ever gets leaked once.

It happens every time you load and unload, surely?

Also I thought this was a general discussion with Data.Unique as a 
concrete example; something else might leak substantially more memory. 
Your witnesses stuff would leak one Integer per module, wouldn't it?

Finally, any memory leak at all can be unacceptable in some contexts. It's 
certainly not something we should just dismiss as "oh, it's only small".



More information about the Haskell-Cafe mailing list