Reporting memory allocated in solaris 32/64 bit

Rajdeep Sengupta rajdeep at
Thu Mar 2 10:04:15 EST 2006


We want our application running on solaris 32/64 bit to report correct
memory allocated by malloc at different stages of execution. By default the
/proc/<PID>/status gives only the heap memory only which does not suffice
our requirement.

The objective is to report memory malloced at various stages of program
In Linux this is being done by a function mallinfo which accesses the data
structures maintained by malloc
While allocating memory requested by program and finds the amount of
currently malloced memory.


We do not find any similar API like mallinfo in standard C library under
solaris. So do anyone has handle such situation, if yes then let me know the
API used in this case. Also I want to use it for 64bit also, so the if 64bit
API is different, then let us know.


Thanks in advance.



More information about the sunmanagers mailing list