From owner-freebsd-current Fri Sep 27 00:45:38 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA05446 for current-outgoing; Fri, 27 Sep 1996 00:45:38 -0700 (PDT) Received: from critter.tfs.com ([140.145.230.252]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id AAA05394; Fri, 27 Sep 1996 00:45:34 -0700 (PDT) Received: from critter.tfs.com (localhost.tfs.com [127.0.0.1]) by critter.tfs.com (8.7.5/8.7.3) with ESMTP id JAA00610; Fri, 27 Sep 1996 09:05:10 +0200 (MET DST) To: Bruce Evans cc: julian@whistle.com, current@freebsd.org Subject: Re: BLOAT in minimal programs In-reply-to: Your message of "Fri, 27 Sep 1996 10:42:48 +1000." <199609270042.KAA02056@godzilla.zeta.org.au> Date: Fri, 27 Sep 1996 09:05:10 +0200 Message-ID: <608.843807910@critter.tfs.com> From: Poul-Henning Kamp Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In message <199609270042.KAA02056@godzilla.zeta.org.au>, Bruce Evans writes: >>>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. Malloc doesn't use stdio if you don't define MALLOC_STATS in it... I'm not to happy about that being the default, it doesn't matter for shlib cases, but for static programs it's a pain. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@ref.tfs.com TRW Financial Systems, Inc. Future will arrive by its own means, progress not so.