From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 22:34:25 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A71A106566C for ; Thu, 20 Oct 2011 22:34:25 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 068088FC16 for ; Thu, 20 Oct 2011 22:34:24 +0000 (UTC) Received: from ur.dons.net.au (ppp118-210-211-94.lns20.adl6.internode.on.net [118.210.211.94]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p9KMYHaw068904 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 21 Oct 2011 09:04:23 +1030 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=iso-8859-1 From: "Daniel O'Connor" In-Reply-To: <4EA0610B.90206@gmail.com> Date: Fri, 21 Oct 2011 09:04:17 +1030 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4EA0610B.90206@gmail.com> To: Razmig K X-Mailer: Apple Mail (2.1244.3) X-Spam-Score: 2.162 (**) BAYES_00,KHOP_DYNAMIC,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: Measuring memory footprint in C/C++ code on FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 22:34:25 -0000 On 21/10/2011, at 4:27, Razmig K wrote: > I think that it would be difficult to achieve the task in a = platform-transparent manner, that's why I'll be using /proc//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? getrusage should be portable and the man page (at least on FreeBSD) = explains each of the fields. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C