
5 Nov
2005
5 Nov
'05
10:13 a.m.
On Sat, Nov 05, 2005 at 12:18:04PM +0000, Joel Reymont wrote:
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
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? Best regards Tomasz