[BusyBox] #define -> static const int
Vladimir N. Oleynik
dzo at simtreas.ru
Sat Jan 6 12:22:41 UTC 2001
Larry Doolittle wrote:
> Now, curiously, BUFSIZ is not defined by busybox. On my
> system, the libc header files define BUFSIZ to be 8192.
> If that's true on your system, too, you have saved 33537 bytes
> of bss by adding 7 calls to xmalloc(). Your printout claims
> 25888 bytes savings, I'm curious if you can explain the difference.
BSS memory pages allocating also demand. You not have gain memory, and
lose disk space.
My idea for all gain space:
#define _BB_DIR_BIN "\000"
#define _BB_DIR_SBIN "\001"
.....
const struct BB_applet applets[] = {
-#define APPLET(a,b,c,d) {a,b,c,d},
+#define APPLET(a,b,c,d) {c a, b, d},
#define APPLET_NAME(pointer_to_BB_applet) \
&(pointer_to_BB_applet->name[1])
--w
vodz
More information about the busybox
mailing list