Measuring memory footprint in C/C++ code on FreeBSD
strontium90 at gmail.com
Fri Oct 21 10:57:20 UTC 2011
Le 21.10.2011 12:26, Ivan Voras a écrit :
> Well, do you know that SIZE in top is virtual memory size, not resident
> size (which is the "RES" column)? You can allocate whatever you want
> from virtual memory, it is not "used" until it's touched.
Yes, I do. So do you suggest using RES as a better indicator of memory
The program in question processes large 3D images via vtk, and I'd like
to measure its memory usgae with different parameter configurations as
the maximum amount of memory acquired during execution. Since SIZE often
happens to be larger than RES, and increase more during execution, I
thought of using it as an indicator of memory footprint.
More information about the freebsd-hackers