svn commit: trunk/busybox: archival archival/libunarchive libbb
vda at busybox.net
vda at busybox.net
Wed Mar 14 00:06:51 UTC 2007
Author: vda
Date: 2007-03-13 17:06:51 -0700 (Tue, 13 Mar 2007)
New Revision: 18092
Log:
gzip: reduce global data footprint, part 3
Modified:
trunk/busybox/archival/gzip.c
trunk/busybox/archival/libunarchive/decompress_unzip.c
trunk/busybox/libbb/messages.c
Changeset:
Modified: trunk/busybox/archival/gzip.c
===================================================================
--- trunk/busybox/archival/gzip.c 2007-03-14 00:06:29 UTC (rev 18091)
+++ trunk/busybox/archival/gzip.c 2007-03-14 00:06:51 UTC (rev 18092)
@@ -355,8 +355,8 @@
uint32_t crc; /* shift register contents */
};
-extern struct global1 *global_ptr;
-#define G1 (*(global_ptr - 1))
+extern struct global1 *ptr_to_globals;
+#define G1 (*(ptr_to_globals - 1))
/* ===========================================================================
@@ -972,7 +972,7 @@
};
-#define G2ptr ((struct global2*)(global_ptr))
+#define G2ptr ((struct global2*)(ptr_to_globals))
#define G2 (*G2ptr)
@@ -2131,8 +2131,8 @@
}
#endif
- global_ptr = xzalloc(sizeof(struct global1) + sizeof(struct global2));
- global_ptr++;
+ ptr_to_globals = xzalloc(sizeof(struct global1) + sizeof(struct global2));
+ ptr_to_globals++;
G2.l_desc.dyn_tree = G2.dyn_ltree;
G2.l_desc.static_tree = G2.static_ltree;
G2.l_desc.extra_bits = extra_lbits;
Modified: trunk/busybox/archival/libunarchive/decompress_unzip.c
===================================================================
--- trunk/busybox/archival/libunarchive/decompress_unzip.c 2007-03-14 00:06:29 UTC (rev 18091)
+++ trunk/busybox/archival/libunarchive/decompress_unzip.c 2007-03-14 00:06:51 UTC (rev 18092)
@@ -455,6 +455,8 @@
* bl, bd: number of bits decoded by tl[] and td[]
*/
/* called once from inflate_block */
+
+/* map formerly local static variables to globals */
#define ml inflate_codes_ml
#define md inflate_codes_md
#define bb inflate_codes_bb
Modified: trunk/busybox/libbb/messages.c
===================================================================
--- trunk/busybox/libbb/messages.c 2007-03-14 00:06:29 UTC (rev 18091)
+++ trunk/busybox/libbb/messages.c 2007-03-14 00:06:51 UTC (rev 18092)
@@ -56,4 +56,4 @@
char bb_common_bufsiz1[BUFSIZ+1];
-void *global_ptr;
+void *ptr_to_globals;
More information about the busybox-cvs
mailing list