From owner-freebsd-small Wed Nov 1 0:55: 9 2000 Delivered-To: freebsd-small@freebsd.org Received: from mimer.webgiro.com (unknown [213.162.128.50]) by hub.freebsd.org (Postfix) with ESMTP id ADD5937B4C5 for ; Wed, 1 Nov 2000 00:55:07 -0800 (PST) Received: by mimer.webgiro.com (Postfix, from userid 66) id 1DBBD2DC0B; Wed, 1 Nov 2000 09:57:58 +0100 (CET) Received: by mx.webgiro.com (Postfix, from userid 1001) id ECF687817; Wed, 1 Nov 2000 09:51:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mx.webgiro.com (Postfix) with ESMTP id 9962510E1A; Wed, 1 Nov 2000 09:51:28 +0100 (CET) Date: Wed, 1 Nov 2000 09:51:28 +0100 (CET) From: Andrzej Bialecki To: les@safety.net Cc: freebsd-small@freebsd.org Subject: Re: Runtime memory footprint In-Reply-To: <200010311816.LAA90875@ns3.safety.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-small@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 31 Oct 2000, Les Biffle wrote: > What determines the runtime memory footprint of a process? I have small > daemons that occupy 25K on disk, don't malloc anything to speak of, but > are 440K to 1024K in memory, according to top and ps. For that matter, > just about nothing in my "ps" display is under 400K. The daemons are > dynamically-linked. Is there anything I can do to reduce the memory > footprint? Among other reasons (listed in answers on -hackers), if you link your programs statically, the parts that you used from external libraries add up to the total size. You can do objdump to see their sizes, and in some cases change the implementation of your program to avoid linking in the most bloated parts, somtimes sacrificing robustness or some unneeded features for the sake of size. Andrzej Bialecki // WebGiro AB, Sweden (http://www.webgiro.com) // ------------------------------------------------------------------- // ------ FreeBSD: The Power to Serve. http://www.freebsd.org -------- // --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-small" in the body of the message