On Fri, Mar 16, 2001 at 08:13:40AM -0300, Tomasz Kowaltowski wrote:
In gcc one can use the function "mallinfo()" in order to know, among other things, the amount of dynamic storage currently allocated by the program through "malloc()". I use it to check for program memory leaks. I would like to know whether there is anything similar for gpc?
I didn't find mallinfo in the info file of gpc, but you can use this:
program test; type mallocinfo = array [0..9] of integer; var Mi : mallocinfo; j : Integer; function Mallinfo : mallocinfo; asmname 'mallinfo';
begin Mi:=Mallinfo; for j:=0 to 9 do writeln(j, ') ->', Mi[j]) end.
I don't know if this is what you expected, because I never used this function and the results are different from C.
Eike