memory_used - Returns the amount of heap storage used
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int memory_used(unsigned long *total_bytes_used_ptr);
This routine returns the amount of heap storage used provided that this
facility is available on the current platform. If this facility is not
available, then ERROR is returned, with an error message being set.
Note that the amount of storage used is always greater than the number of
bytes allocated, sometimes by a substantial amount. This is because memory is
not returned to the system when it is freed; freed memory is simply available
for re-use by the allocating process.
The amount of heap storage used in bytes, if available, otherwise ERROR
is returned, with an error message being set.
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.