[Haskell-cafe] GC

Andrew Coppin andrewcoppin at btinternet.com
Fri May 8 17:37:32 EDT 2009

John Lask wrote:
> on the other hand a function to release pool memory to the OS down to 
> the current active level should (I hope) be easily implementable, and 
> quickly incorporated into application where required, whereas arriving 
> at one or more automatic deallocation policies would most likely 
> require some analysis/trial and error.

I would suggest that trying to do this "automatically" in a way that is 
optimal for all applications requires some fairly serious heuristics.

OTOH, for many Haskell programs it isn't a problem in the first place. 
(E.g., if you write something like Darcs which only ever runs for a few 
seconds, you barely need GC in the first place.) I'm just thinking, the 
application writer probably knows more about their specific program than 
the compiler designers do, so it would be nice to be able to provide 
hints to the RTS.

(Still, until somebody implements it, I don't know how hard it is to 
actually decide when to use such a feature...)

More information about the Haskell-Cafe mailing list