Date: Thu, 20 Oct 2011 19:57:31 +0200 From: Razmig K <strontium90@gmail.com> To: freebsd-hackers@freebsd.org Subject: Measuring memory footprint in C/C++ code on FreeBSD Message-ID: <4EA0610B.90206@gmail.com>
next in thread | raw e-mail | index | archive | help
Hello
I'd like to measure the memory footprint in C/C++ code for a
program running under FreeBSD and Linux in terms of total process size
including heap objects. Due to execution length, I'd like to avoid the
use of valgrind.
I think that it would be difficult to achieve the task in a
platform-transparent manner, that's why I'll be using /proc/<pid>/status
on Linux, and do something else on FreeBSD.
I was adviced to have a look on getrusage, which I did, but I found
descriptions of certain fields of struct rusage in the manpage too
cryptic to make a proper use of the call.
Could someone please point me in the right direction?
Thanks very much.
~Razmig
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EA0610B.90206>
