[Haskell] Re: state of HaXml?

Sven Panne sven.panne at aedion.de
Thu Jan 11 11:36:10 EST 2007


Am Donnerstag, 11. Januar 2007 06:05 schrieb Samuel Bronson:
> Yeah, what I mean is that the garbage collector does not *look* for
> unreachable filehandles to close, or get run when many filehandles
> have been allocated. It only runs finalizers when it happens upon
> things with finalizers, it doesn't have any idea what they are for.

What could actually be done for open(2) and similar OS calls is that in case 
of an EMFILE/ENFILE error condition "enough" GC is triggered that unused file 
handles are closed, and then the open(2) is retried. This does not solve all 
problems mentioned, but is a step into the right direction. Memory should not 
be the only resource GC cares about...

Cheers,
   S.


More information about the Haskell mailing list