"make bigdata" biggest offender dealt with:
xmalloc 16Kb buffer instead of keeping it in bss
This commit is contained in:
parent
610c4aa197
commit
93f6aa6bca
@ -613,7 +613,8 @@ static void alarm_intr(int alnum)
|
|||||||
static void check_blocks(void)
|
static void check_blocks(void)
|
||||||
{
|
{
|
||||||
int try, got;
|
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;
|
currently_testing = 0;
|
||||||
signal(SIGALRM, alarm_intr);
|
signal(SIGALRM, alarm_intr);
|
||||||
@ -635,6 +636,7 @@ static void check_blocks(void)
|
|||||||
badblocks++;
|
badblocks++;
|
||||||
currently_testing++;
|
currently_testing++;
|
||||||
}
|
}
|
||||||
|
free(buffer);
|
||||||
printf("%d bad block(s)\n", badblocks);
|
printf("%d bad block(s)\n", badblocks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user