Measuring memory footprint in C/C++ code on FreeBSD

Wojciech Puchar wojtek at
Fri Oct 21 15:34:27 UTC 2011

>> footprint?
> Almost certainly yes. Measuring virtual memory is significantly less
> important for real-world loads. Some of this is very nicely described
> here: .

just run top and compare RES and SIZE fields.

extreme example:

#include <unistd.h>
int blah[1000000000];

run it and see this in top
13317 wojtek        1  45    0  3817M   684K nanslp  0   0:00  0.00% 1

More information about the freebsd-hackers mailing list