[BusyBox] #define -> static const int

Matt Kraai kraai at alumni.carnegiemellon.edu
Fri Jan 5 22:51:33 UTC 2001


On Fri, Jan 05, 2001 at 03:19:11PM -0700, Mark Whitley wrote:
> Fellow Busyboxers,
> 
> I just devoted some time to changing numerous occurrances of #define'ed
> integer symbols to 'static const ints'. At first, I thought this was a little
> anal retentive of me, but encouraged by the slogan "An engineer is someone who
> can't leave well-enough alone", I pressed on.
> 
> More seriously, I thought that going through this exersize would help reduce
> the size of the busybox bss segment. I was not dissapointed. Here are some
> hard numbers:
> 
> 
> $ size busybox-orig 
>    text    data     bss     dec     hex filename
>  236189   29652   65848  331689   50fa9 busybox-orig
> $ size busybox      
>    text    data     bss     dec     hex filename
>  237293   29652   39960  306905   4aed9 busybox
> 
> 
> Nice, eh?

Just to be clear, changing the bss size only effects the memory
footprint of busybox, not its on-disk size, right?

Matt





More information about the busybox mailing list