summaryrefslogtreecommitdiff
path: root/util-linux/mkfs_minix.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-30 21:11:01 +0000
committerDenis Vlasenko2006-11-30 21:11:01 +0000
commit93f6aa6bca1621fc5bce8f543e3e0b3a0be01378 (patch)
tree0b9d8eb5f92194aa86fafe08625752ebb218dca4 /util-linux/mkfs_minix.c
parent610c4aa197e057dea3848054d08fa9980ea679c0 (diff)
downloadbusybox-93f6aa6bca1621fc5bce8f543e3e0b3a0be01378.zip
busybox-93f6aa6bca1621fc5bce8f543e3e0b3a0be01378.tar.gz
"make bigdata" biggest offender dealt with:
xmalloc 16Kb buffer instead of keeping it in bss
Diffstat (limited to 'util-linux/mkfs_minix.c')
-rw-r--r--util-linux/mkfs_minix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index f0b658d..af19da6 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -613,7 +613,8 @@ static void alarm_intr(int alnum)
static void check_blocks(void)
{
int try, got;
- static char buffer[BLOCK_SIZE * TEST_BUFFER_BLOCKS];
+ /* buffer[] was the biggest static in entire bbox */
+ char *buffer = xmalloc(BLOCK_SIZE * TEST_BUFFER_BLOCKS);
currently_testing = 0;
signal(SIGALRM, alarm_intr);
@@ -635,6 +636,7 @@ static void check_blocks(void)
badblocks++;
currently_testing++;
}
+ free(buffer);
printf("%d bad block(s)\n", badblocks);
}