From owner-freebsd-current Fri Sep 27 03:54:34 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA28766 for current-outgoing; Fri, 27 Sep 1996 03:54:34 -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 DAA28719 for ; Fri, 27 Sep 1996 03:54:27 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.7.6/8.6.9) id UAA20273; Fri, 27 Sep 1996 20:49:19 +1000 Date: Fri, 27 Sep 1996 20:49:19 +1000 From: Bruce Evans Message-Id: <199609271049.UAA20273@godzilla.zeta.org.au> To: bde@zeta.org.au, phk@critter.tfs.com Subject: Re: BLOAT in minimal programs Cc: current@freebsd.org, julian@whistle.com Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >>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. atexit() could use sbrk() instead of malloc(). This would work fairly well since atexit() rarely needs to expands its default of 32 pointers (even 32 is wasteful) and never frees its memory. Bruce