mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
reduce the amount of memory wasted when generating the output file
This commit is contained in:
parent
c542138300
commit
c8b7622e0e
1 changed files with 2 additions and 2 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue