Haskell API for memory useage
bjpop at csse.unimelb.edu.au
Sat Mar 10 09:41:32 EST 2007
I once write a little thing called HighWaterMark:
It is GHC specific, and it doesn't count memory allocated by foreign stuff
(ie C stack etc).
I haven't tried it out on a modern GHC, so there is probably some bit rot.
> -----Original Message-----
> From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-
> haskell-users-bounces at haskell.org] On Behalf Of Neil Mitchell
> Sent: 10 March 2007 13:49
> To: GHC Users
> Subject: Haskell API for memory useage
> Haskell has getCPUTime to get the amount of CPU Time that has been
> consumed, but has no equivalent for memory use. I would like to get
> something similar to -RTS -t, but from a Haskell program. I'm not
> overly fussed about what memory statistic I get, as long as it is
> something that corresponds in some way to the amount of memory that
> has been used - cells, heap size, live heap etc are all fine.
> So, I'm after something like: getMemoryUse :: IO Integer
> Is there anything I can use to do this?
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
More information about the Glasgow-haskell-users