Further sh(1) plans
Bruce Evans
brde at optusnet.com.au
Wed Jun 23 11:31:58 UTC 2010
On Tue, 22 Jun 2010, [utf-8] Dag-Erling Smørgrav wrote:
> "M. Warner Losh" <imp at bsdimp.com> writes:
>> Dag-Erling Smørgrav <des at des.no> writes:
>> "M. Warner Losh" <imp at bsdimp.com> writes:
>>>> ~4k isn't worth a fuss. However, ~315k from libncurses and ~110k from
>>>> libedit is,
They aren't quite that bad. More like 220K for both of them combined
(static bloat of text size; their shared library and/or memory footprint
may be worse). This is up from 180K in RELENG_5 and IIRC 150K in
RELENG_4. "optimizing" these libraries by compiling them with -O2
cannot help.
220K is still disgusting, since it is more than twice the size of the
whole stripped file /bin/sh (90K) in FreeBSD-1. (I have to use the
file size for comparison with old binaries since `size' is broken on
aout format.)
The file size in FreeBSD-2 was only 270K IIRC. This was with aout and
its extra padding, and with libedit and possible /etc/passwd support,
and even with builtin printf, so it had more features than now!
Omitting /etc/passwd support (just 1 getpwnam() call) as well as history
reduces the text size by another 350K. Its file size, for essentially
the same features as the FreeBSD-1 sh, is 285K (the full reduction is
from 1059K, giving a total reduction of 774K). (I have to use the
file size for comparison since `size' is broken on aout format.) In
FreeBSD-5, the reduction is to 170K. malloc() is responsible for many
of the extra 115K.
>>> Oh come on, they were there already. Don't blame tab completion for
>>> this.
>> They weren't there before. Guess I missed when they went in.
>
> Time flies when you're having fun...
Not too much fun to watch the bloat. I notice it more since I use static
linkage for everything except ports. A 64MB root partition is barely
large enough for static everything and 6 kernels.
Bruce
More information about the freebsd-arch
mailing list