[Haskell-cafe] Re: Memory usage outside of the Haskell heap
Joel Reymont
joelr1 at gmail.com
Sat Nov 5 07:58:41 EST 2005
Is there a way to tell ghc to use a debug version of the malloc
library when building? Can I just pass in -lmalloc_debug or something
like that?
On Nov 5, 2005, at 12:18 PM, Joel Reymont wrote:
> Folks,
>
> How can I profile memory usage outside of the Haskell heap? I'm
> using FastStrings for everything and some folks on #haskell suspect
> it might be causing my problems.
>
> hGet :: Handle -> Int -> IO FastString
> hGet _ 0 = return empty
> hGet h i = do fp <- mallocForeignPtr i
> l <- withForeignPtr fp $ \p-> hGetBuf h p i
> return $ PS fp 0 l
--
http://wagerlabs.com/
More information about the Haskell-Cafe
mailing list