From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 10:57:20 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 97BF1106564A for ; Fri, 21 Oct 2011 10:57:20 +0000 (UTC) (envelope-from strontium90@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2AF7E8FC13 for ; Fri, 21 Oct 2011 10:57:19 +0000 (UTC) Received: by wyi40 with SMTP id 40so4975448wyi.13 for ; Fri, 21 Oct 2011 03:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=lwdOmRfbRd+tUCfZzG2O82Lh4TyczSrkh7gOycosRfg=; b=DJUVc8OzS/V/OCvdzl8q060XlUAG+vyQr8WYRdMR44fGXJWU+k3ZTIkehjLkyl7ESJ lEHrSOpM10yY2DolhwJhKE6EFzIG8CSO2JQRQFiWKL/4mrc0S3Xban9AA47O6NswzeE1 kBBKX1LaYnmPdu3LNp1c0GbQkb7it/fKfmh/0= Received: by 10.216.131.12 with SMTP id l12mr6654665wei.95.1319194639118; Fri, 21 Oct 2011 03:57:19 -0700 (PDT) Received: from iv-sv-328.creatis.insa-lyon.fr (iv-sv-328.creatis.insa-lyon.fr. [195.220.108.195]) by mx.google.com with ESMTPS id l42sm2125622wbn.16.2011.10.21.03.57.17 (version=SSLv3 cipher=OTHER); Fri, 21 Oct 2011 03:57:18 -0700 (PDT) Message-ID: <4EA15004.50308@gmail.com> Date: Fri, 21 Oct 2011 12:57:08 +0200 From: Razmig K User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0) Gecko/20111003 Thunderbird/7.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4EA0610B.90206@gmail.com> <20111021084413.GA46039@server.vk2pj.dyndns.org> <4EA1471E.9050501@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: Fri, 21 Oct 2011 10:57:20 -0000 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 footprint? 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. ~Razmig