Date: Mon, 16 Oct 1995 15:16:12 +1000 From: Bruce Evans <bde@zeta.org.au> To: ache@astral.msk.su, bde@zeta.org.au, j@uriah.heep.sax.de Cc: hackers@freefall.freebsd.org, kaleb@x.org Subject: Re: A couple problems in FreeBSD 2.1.0-950922-SNAP Message-ID: <199510160516.PAA11669@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510160516.PAA11669>
