From owner-freebsd-current Tue Jul 7 09:56:17 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA27104 for freebsd-current-outgoing; Tue, 7 Jul 1998 09:56:17 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA27098 for ; Tue, 7 Jul 1998 09:56:15 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.8.8/8.8.5) with ESMTP id JAA00592; Tue, 7 Jul 1998 09:54:34 -0700 (PDT) Message-Id: <199807071654.JAA00592@dingo.cdrom.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: Andrzej Bialecki cc: Mike Smith , freebsd-current@FreeBSD.ORG Subject: Re: FreeBSD in less than 4MB RAM In-reply-to: Your message of "Tue, 07 Jul 1998 10:01:45 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 07 Jul 1998 09:54:34 -0700 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Mon, 6 Jul 1998, Mike Smith wrote: > > > > Hi, > > > > > > This is slightly more general question than in the Subject. > > > > > > First issue is: what would it take to squeeze any useful combination of > > > kernel, init plus two-three (small) user programs in 4MB? Which > > > (dispensable) parts of the kernel require so much space? After removing > > > all I could think of (leaving FFS, fd0, and ed0, though) the kernel size > > > is still about 700kB big, and quite another question is how this > > > translates into running size... > > > > try "du *.o | sort -n" in your compile directory. > > I did (Soren can be proud - he wins with syscons.o :-), but this really > doesn't tell anything about _running_ sizes of various data structures... vmstat -m gives you allocation statistics while the kernel is running, and 'size' will tell you how big the bss is in total. If you want to work out how big the various symbols in the bss are, use something like # nm -t kernel | sort | where looks for lines with a type field of 'b' or 'B', and calculates the distance between the current symbol and the next one. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message