Measuring memory footprint in C/C++ code on FreeBSD
Wojciech Puchar
wojtek at wojtek.tensor.gdynia.pl
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: https://www.varnish-cache.org/trac/wiki/ArchitectNotes .
definitely.
just run top and compare RES and SIZE fields.
extreme example:
#include <unistd.h>
int blah[1000000000];
main(){sleep(1000);}
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