
22 Jun
2004
22 Jun
'04
4:27 a.m.
On 22 June 2004 03:51, Bernard James POPE wrote:
The mblocks_allocated variable should give me what I want.
I think having access to this would also be useful to people who are profiling their programs. You see a few papers where people want to report how much memory their application needs, and having a high-water mark is usually good enough. Beats trying to get the information from top.
Note that this only counts memory allocated by the GHC storage manager; it doesn't include the data segments, malloc(), the C stack, or other mmap()'d stuff. Be careful if your program is using any of these other allocation methods (perhaps via an external library through the FFI). Cheers, Simon