Yet another weakly defined bug report

Simon Marlow
Mon, 17 Feb 2003 14:07:09 -0000

> "Simon Marlow" <> writes:
> >                                                       To fix these
> > problems you have to think carefully about strictness and=20
> demand in your
> > program.  For memory we have heap profilers to help out,=20
> but we don't
> > have I/O descriptor profilers for lazy I/O!
> Surely I/O descriptors are just a type of heap-value, and as such
> can be profiled in the normal way (producer, retainer, etc), just
> like any other heap construction?

File descriptors are held in the kernel, not the heap.  Hmmm, I suppose
you could track Handles, which notionally "hold on to" a file
descriptor, but it's not completely reliable because a Handle will be
held by a finalizer for an unspecified period of time before the
descriptor is released.  In practice it might not be a serious problem
unless there are lots of other threads.=20