From owner-freebsd-questions@FreeBSD.ORG Fri Sep 5 06:58:38 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADBB816A4BF for ; Fri, 5 Sep 2003 06:58:38 -0700 (PDT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD55543FBF for ; Fri, 5 Sep 2003 06:58:37 -0700 (PDT) (envelope-from freebsd-questions-local@be-well.no-ip.com) Received: from be-well.ilk.org (be-well.no-ip.com[66.30.200.37]) by comcast.net (rwcrmhc12) with ESMTP id <2003090513583701400rgamne>; Fri, 5 Sep 2003 13:58:37 +0000 Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com [66.30.200.37] (may be forged)) by be-well.ilk.org (8.12.9/8.12.9) with ESMTP id h85DwZFm002578; Fri, 5 Sep 2003 09:58:35 -0400 (EDT) (envelope-from freebsd-questions-local@be-well.no-ip.com) Received: (from lowell@localhost) by be-well.ilk.org (8.12.9/8.12.6/Submit) id h85DwZWN002575; Fri, 5 Sep 2003 09:58:35 -0400 (EDT) X-Authentication-Warning: be-well.ilk.org: lowell set sender to freebsd-questions-local@be-well.ilk.org using -f Sender: lowell@be-well.no-ip.com To: jesse@wingnet.net References: From: Lowell Gilbert Date: 05 Sep 2003 09:58:35 -0400 In-Reply-To: Message-ID: <44fzjb72wk.fsf@be-well.ilk.org> Lines: 16 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@freebsd.org Subject: Re: process memory peak recording X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2003 13:58:38 -0000 Jesse Guardiani writes: > During a recent programming/installation > project, I found myself wanting to know > the peak memory usage of a given command/process. > > Is there any way to gather this information > without recompiling an application with a > sleep or wait statement at the (assumed) > point of peak memory usage and then looking > at the process with 'ps'? Running under a debugger is one typical way of doing this. For strictly malloc(3)'d memory, a memory profiler will be an easier option. If I remember correctly, there is a choice of them in the ports system.