From owner-freebsd-hackers Sun Oct 15 22:22:27 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id WAA26069 for hackers-outgoing; Sun, 15 Oct 1995 22:22:27 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id WAA26064 for ; Sun, 15 Oct 1995 22:22:21 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id PAA11669; Mon, 16 Oct 1995 15:16:12 +1000 Date: Mon, 16 Oct 1995 15:16:12 +1000 From: Bruce Evans Message-Id: <199510160516.PAA11669@godzilla.zeta.org.au> To: ache@astral.msk.su, bde@zeta.org.au, j@uriah.heep.sax.de Subject: Re: A couple problems in FreeBSD 2.1.0-950922-SNAP Cc: hackers@freefall.freebsd.org, kaleb@x.org Sender: owner-hackers@FreeBSD.org Precedence: bulk >>BTW, this hack adds 24K to the size of a minimal statically linked >>program `main() {}' and defeats the point of most of the specially named >>routines in crt0.c. E.g., there is a special version of getenv() named >And what? Now too many pgms require proper locale support, even ls, >so we can't avoid this thing. Code added regardles of >ENABLE_STARTUP_LOCALE set or not, Yes, bloat is added even when ENABLE_STARTUP_LOCALE isn't set. Bloat is added even when no ctype function is called (this is normal for most programs in /bin and /sbin - grep shows "ctype.h" in only 25 out of 80 programs in /usr/src/[s]bin. >so 'hack' means this variable >as I understand and not code added. As I already say, For me, the `hack' is the global placement of the test. It's good for fixing everything at once, but is wasteful. >I can revert default case to pick ctype and use variable >DISABLE_STARTUP_LOCALE to disable it for debugging purposes. This wouldn't reduce the bloat because lots of code is required to pull in the default locale. More measurements: size of /bin/cat with locale support: 64K size of /bin/cat without locale support: 44K (cat uses ctype only for cat -v) time for 1000 fork+execs with ENABLE_STARTUP_LOCALE unset: 92.81 real 6.47 user 76.68 sys time for 1000 fork+execs with ENABLE_STARTUP_LOCALE set and LANG set to it_IT.ISO_8859-1: 112.58 real 15.43 user 94.89 sys Bruce