[Haskell-cafe] how to measure memory usage?

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Sun Sep 19 06:55:18 EDT 2010

How could I measure the amount of memory 
that my ghc-compiled program is actually using,
from inside the program? 

It is expanding nodes in a (game) tree,
and I need to stop this when it gets 
near the physical limits of the system
(or some other limit that I want to set on the command line)

The node size is varying so I cannot just
pre-compute a maximal number of nodes.

Thanks - J.W.

PS: the program is this:

More information about the Haskell-Cafe mailing list