Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Nov 2000 09:51:28 +0100 (CET)
From:      Andrzej Bialecki <abial@webgiro.com>
To:        les@safety.net
Cc:        freebsd-small@freebsd.org
Subject:   Re: Runtime memory footprint
Message-ID:  <Pine.BSF.4.20.0011010947170.40699-100000@mx.webgiro.com>
In-Reply-To: <200010311816.LAA90875@ns3.safety.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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

//  <abial@webgiro.com> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.20.0011010947170.40699-100000>