Subject: RE: memory consumption of crunched binaries
To: 'Jaromir Dolecek' <jdolecek@netbsd.org>
From: Aaditya Rai <ARai@rhapsodynetworks.com>
List: tech-kern
Date: 11/15/2001 12:23:57
Hey Jaromir,
Thanks! I did some ps-fiddling and think that what you suggest is indeed
true!
Is there any other way to verify this. (top is not good enuf...?)
Thanks again!

Aaditya Rai


-----Original Message-----
From: Jaromir Dolecek [mailto:jdolecek@netbsd.org]
Sent: Thursday, November 15, 2001 12:02 PM
To: Aaditya Rai
Cc: 'tech-kern@netbsd.org'
Subject: Re: memory consumption of crunched binaries


Aaditya Rai wrote:
> I have a piece of hardware (custom) with constrained disk space and lots
of
> ram. Since I had to put a lot of my programs on it, I decided to crunch
all
> my programs and came up with a surprisingly small binary (about 8M instead
> of 35M). Everything was cool, untill I realized that each of my programs
> when run, occupy at least 9.1Mb RAM (as opposed to 800KB for
non-crunched).
> Since most of them are daemons this is just not acceptable in my case :-(.
> I can understand why this could be happening, but is there a way to make
> them occupy less Ram when loaded...? (e.g. crunch them differently, or
> crunch libraries separately etc.)

That 9.1MB is daemons' private memory, or all memory used by the
programs? If the latter, ~8MB of it is binary text, which is shared between
processes. So, only ~1.1MB of extra physical memory is actually allocated
per-process.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>
http://www.NetBSD.org/Ports/i386/ps2.html
-=  Those who would give up liberty for a little temporary safety deserve
=-
-=  neither liberty nor safety, and will lose both.  -- Benjamin Franklin
=-