diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-30 21:11:01 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-30 21:11:01 +0000 |
commit | 93f6aa6bca1621fc5bce8f543e3e0b3a0be01378 (patch) | |
tree | 0b9d8eb5f92194aa86fafe08625752ebb218dca4 /util-linux/mkfs_minix.c | |
parent | 610c4aa197e057dea3848054d08fa9980ea679c0 (diff) | |
download | busybox-w32-93f6aa6bca1621fc5bce8f543e3e0b3a0be01378.tar.gz busybox-w32-93f6aa6bca1621fc5bce8f543e3e0b3a0be01378.tar.bz2 busybox-w32-93f6aa6bca1621fc5bce8f543e3e0b3a0be01378.zip |
"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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index f0b658d0e..af19da68c 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
@@ -613,7 +613,8 @@ static void alarm_intr(int alnum) | |||
613 | static void check_blocks(void) | 613 | static void check_blocks(void) |
614 | { | 614 | { |
615 | int try, got; | 615 | int try, got; |
616 | static char buffer[BLOCK_SIZE * TEST_BUFFER_BLOCKS]; | 616 | /* buffer[] was the biggest static in entire bbox */ |
617 | char *buffer = xmalloc(BLOCK_SIZE * TEST_BUFFER_BLOCKS); | ||
617 | 618 | ||
618 | currently_testing = 0; | 619 | currently_testing = 0; |
619 | signal(SIGALRM, alarm_intr); | 620 | signal(SIGALRM, alarm_intr); |
@@ -635,6 +636,7 @@ static void check_blocks(void) | |||
635 | badblocks++; | 636 | badblocks++; |
636 | currently_testing++; | 637 | currently_testing++; |
637 | } | 638 | } |
639 | free(buffer); | ||
638 | printf("%d bad block(s)\n", badblocks); | 640 | printf("%d bad block(s)\n", badblocks); |
639 | } | 641 | } |
640 | 642 | ||