reduce the amount of memory wasted when generating the output file

This commit is contained in:
Bill Currie 2009-12-20 12:19:16 +00:00 committed by Jeff Teunissen
parent c542138300
commit c8b7622e0e
1 changed files with 2 additions and 2 deletions

View File

@ -492,9 +492,9 @@ init_space (int size, pr_type_t *data)
{
defspace_t *space = new_defspace ();
space->size = size;
space->max_size = RUP (space->size, 65536);
space->max_size = RUP (space->size, 32);
if (!space->max_size)
space->max_size = 65536;
space->max_size = 32;
space->data = malloc (space->max_size * sizeof (pr_type_t));
if (size && data) {
memcpy (space->data, data, size * sizeof (pr_type_t));