Does it make sense to reduce bss?
Rob Landley
rob at landley.net
Wed Jan 3 22:27:31 UTC 2007
On Tuesday 02 January 2007 8:31 pm, Denis Vlasenko wrote:
> Hi,
>
> Current svn with all options on has ~85k in bss. It is not a problem
> for MMU systems but NOMMU, I suppose, would benefit from smaller bss.
>
> I was removing largish bss users and mostly fixed big ones,
> but should I go after not-so-big ones too?
>
> For example:
>
> Attached patch moves 8k of fsck_minix's buffers from bss to xzalloc'ed
> space, but it costs ~150 bytes of code:
This is why busybox historically had the allocation macros to put stuff on the
stack or malloc it. We didn't use them much, and it turns out putting stuff
on the _stack_ generally is not an improvement for nommu guys, and tends to
make things bigger on register starved architectures like x86.
For toybox I've done the "union of global structs" thing I talked about last
year here, keeping bss use down from day 1, and I'm no longer paying all that
much attention to how busybox does it. Sorry.
Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
More information about the busybox
mailing list