
21 Jun
2004
21 Jun
'04
9:50 a.m.
On 21 June 2004 09:14, John Meacham wrote:
There might be some RTS calls to query the heap, but someone else is probably more qualified to comment on that.
The value of the mblocks_allocated variable in the RTS will give you the number of "megablocks" currently mmap()ed into the address space of the executable, which roughly equates to the amount of memory the program is using. A megablock is MBLOCK_SIZE bytes, currently 1Mb. Megablocks are never released, so this only gives you an upper limit for the amount of memory in use. Cheers, Simon