summaryrefslogtreecommitdiff
path: root/archival/bz/compress.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-12-02 08:35:37 +0000
committerDenis Vlasenko2007-12-02 08:35:37 +0000
commitab801874f852312787c049272c20b14e06ed8195 (patch)
tree1cfd38cfe48ed6a6625ce559ab7f3e5778a980be /archival/bz/compress.c
parent8003e266edbc0ec62a586dd70dcc80dc13e2dbf0 (diff)
downloadbusybox-ab801874f852312787c049272c20b14e06ed8195.zip
busybox-ab801874f852312787c049272c20b14e06ed8195.tar.gz
attack the biggest stack users:
-mkfs_minix_main [busybox_unstripped]: 4288 -mkfs_minix_main [busybox_unstripped]: 4276 -grave [busybox_unstripped]: 4260 (bzip2 users too - not listed) price we pay in code size increase: mainSort 2458 2515 +57 grave 1005 1058 +53 sendMTFValues 2177 2195 +18 BZ2_blockSort 122 125 +3 mkfs_minix_main 3070 3022 -48 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/1 up/down: 131/-48) Total: 83 bytes
Diffstat (limited to 'archival/bz/compress.c')
-rw-r--r--archival/bz/compress.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/archival/bz/compress.c b/archival/bz/compress.c
index b72edbb..640b887 100644
--- a/archival/bz/compress.c
+++ b/archival/bz/compress.c
@@ -264,13 +264,16 @@ void sendMTFValues(EState* s)
* are also globals only used in this proc.
* Made global to keep stack frame size small.
*/
+#define code sendMTFValues__code
+#define rfreq sendMTFValues__rfreq
+#define len_pack sendMTFValues__len_pack
uint16_t cost[BZ_N_GROUPS];
int32_t fave[BZ_N_GROUPS];
uint16_t* mtfv = s->mtfv;
- alphaSize = s->nInUse+2;
+ alphaSize = s->nInUse + 2;
for (t = 0; t < BZ_N_GROUPS; t++)
for (v = 0; v < alphaSize; v++)
s->len[t][v] = BZ_GREATER_ICOST;
@@ -453,7 +456,7 @@ void sendMTFValues(EState* s)
/* maxLen was changed from 20 to 17 in bzip2-1.0.3. See
* comment in huffman.c for details. */
for (t = 0; t < nGroups; t++)
- BZ2_hbMakeCodeLengths(&(s->len[t][0]), &(s->rfreq[t][0]), alphaSize, 17 /*20*/);
+ BZ2_hbMakeCodeLengths(s, &(s->len[t][0]), &(s->rfreq[t][0]), alphaSize, 17 /*20*/);
}
AssertH(nGroups < 8, 3002);
@@ -602,6 +605,9 @@ void sendMTFValues(EState* s)
selCtr++;
}
AssertH(selCtr == nSelectors, 3007);
+#undef code
+#undef rfreq
+#undef len_pack
}