From owner-freebsd-current Thu Sep 26 17:58:46 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA28586 for current-outgoing; Thu, 26 Sep 1996 17:58:46 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA28513 for ; Thu, 26 Sep 1996 17:58:39 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.7.6/8.6.9) id KAA02056; Fri, 27 Sep 1996 10:42:48 +1000 Date: Fri, 27 Sep 1996 10:42:48 +1000 From: Bruce Evans Message-Id: <199609270042.KAA02056@godzilla.zeta.org.au> To: julian@whistle.com, phk@critter.tfs.com Subject: Re: BLOAT in minimal programs Cc: current@freebsd.org Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >>I wanted to write a minimal footprint program >>that would be as tiny as possible.. > >recompile libc with at least this change in libc/stdlib/malloc.c: > >#undef MALLOC_STATS Even better: don't use malloc(): main() {} atexit() {} atexit() is normally linked to and references malloc(), although it only calls malloc() when there are a lot of atexits. malloc() now uses stdio and stdio uses half the universe. Bruce