[Haskell-cafe] Re: GC'ing file handles and other resources

Peter Hercek phercek at gmail.com
Wed Apr 16 03:49:57 EDT 2008


Abhay Parvate wrote:
> I am not saying that it should claim it as soon as it is unused; all I 
> am saying that as soon as a priority object becomes unreferenced, it 
> should be the first choice for collecting in the next collect.
> Further I was under the impression (I may be wrong) that it uses a 
> generational GC and therefore scans allocated memory incrementally; not 
> the whole at a time. Please correct me if I am wrong.
> 

It would be hard to separate memory collection from handle collection.
  But what could be done is start GC not only when memory consumption
  reaches some threshold but also when handle consumption reaches some
  (other) threshold. I'm curious whether it would work :-)

Peter.



More information about the Haskell-Cafe mailing list