[BusyBox] bss size (was Re: suggestion for 'better' busybox)

Paul Fox pgf at brightstareng.com
Mon Jan 24 16:12:58 UTC 2005


while not exactly flowing from the current thread, can i mention
something that we've noticed that could be improved?

currently, all the applets link together, and where each has its
own private bss space needs, these needs all get concatenated
together into one quite large zero-fill-on-demand segment. 
since each applet runs as a separate process, each gets a full
copy of this non-shared segment, but only uses a small part of it --
just the amount taken by globals and statics specific to that
applet.  no actual memory is wasted, since the unused parts of
this segment will never page in, but there are a lot of page
table entries consumed.  a recent fully configured cvs build (for
x86) gives me this:

    $ size busybox
       text    data     bss     dec     hex filename
     563185   12396  998644 1574225  180551 busybox

that's almost a meg of bss.  i forget what the current pagesize
is these days, and certainly don't know it for the multitude of
architectures people are putting busybox on these days, but using
a meg's worth of page table entries for something as simple as
"false" or "echo" seems a little extravagant.

perhaps there are linker tricks that could be used to overlap the
applet-specific bss areas.  it seems like something might be possible,
at least for some configurations of busybox.

paul
=---------------------
 paul fox, pgf at brightstareng.com



More information about the busybox mailing list