[Haskell-cafe] Memory usage outside of the Haskell heap

Joel Reymont joelr1 at gmail.com
Sun Nov 6 05:59:38 EST 2005

On Nov 5, 2005, at 3:13 PM, Tomasz Zielonka wrote:

> I just checked that the memory allocated with
> Foreign.ForeignPtr.mallocForeignPtrBytes is included in the GC stats.
> Does the FastString library use its own implementation of  
> mallocForeignPtr?


-- (internal) GC wrapper of mallocForeignPtrArray
mallocForeignPtr :: Int -> IO (ForeignPtr Word8)
mallocForeignPtr l = when (l > 1000000) performGC >>  
mallocForeignPtrArray l


More information about the Haskell-Cafe mailing list