Memory consumption API

159 Views Asked by At

Is there a way to get total heap consumption (and consumption of specific datatypes) in app runtime (GHC)? I'm writing profiler for my interpreter, so I can't use standard ways.

1

There are 1 best solutions below

0
On BEST ANSWER

You can get the total heap consumption and other stats via getGCStats in module GHC.Stats, at least if you run your program with +RTS -T.