Effect of large binaries on garbage collection

Adrian Hey ahey@iee.org
Sat, 15 Mar 2003 19:30:29 +0000

On Wednesday 12 March 2003 00:49, Manuel M T Chakravarty wrote:
> "Simon Peyton-Jones" <simonpj@microsoft.com> wrote,
> > | In the current CVS GHC, undoubtedly the right thing to use is
> > | Foreign.mallocForeignPtr.  Internally these are implemented as
> > | MutableByteArray#, so you get fast allocation and GC, but from the
> > | programmer's point of view it's a normal ForeignPtr.
> >
> > I wonder how it is for a random FFI user to discover this.  Does some
> > advice belong in the FFI spec, or in GHC's FFI chapter?
> What is needed is a FFI tutorial (in addition to the spec);
> similar to how we have the Gentle Introduction to complement
> the Report.

Thank's for the advice from everybody. Actually, on the whole I think
the FFI spec is pretty easy to understand, but tutorial would be nice
too :-) There are obviously subtleties about it which I had not
understood properly.

Adrian Hey