memory statistics via an API ?

2011-07-19 Thread Tim Docker
The +RTS -s runtime arguments give some useful details the memory 
usage of a program on exit. eg:


 102,536 bytes allocated in the heap
   2,620 bytes copied during GC
  36,980 bytes maximum residency (1 sample(s))
  28,556 bytes maximum slop
   1 MB total memory in use (0 MB lost due to fragmentation)

Is there any means of obtaining this information at runtime, via some 
API? It would be useful for monitoring a long running server process.


Tim

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: memory statistics via an API ?

2011-07-19 Thread Edward Z. Yang
Not currently, but I am planning on adding this functionality in the near
future.

Excerpts from Tim Docker's message of Wed Jul 20 13:44:41 -0400 2011:
 The +RTS -s runtime arguments give some useful details the memory 
 usage of a program on exit. eg:
 
   102,536 bytes allocated in the heap
 2,620 bytes copied during GC
36,980 bytes maximum residency (1 sample(s))
28,556 bytes maximum slop
 1 MB total memory in use (0 MB lost due to fragmentation)
 
 Is there any means of obtaining this information at runtime, via some 
 API? It would be useful for monitoring a long running server process.
 
 Tim
 

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users