fix geometric growth in _alpm_greedy_grow
It was allocating the required size rather than the calculated new size, resulting in pathological incremental reallocations. Signed-off-by: Daniel Micay <danielmicay@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
21281e9b69
commit
c6263da168
1 changed files with 1 additions and 1 deletions
|
@ -1326,7 +1326,7 @@ void *_alpm_greedy_grow(void **data, size_t *current, const size_t required)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _alpm_realloc(data, current, required);
|
return _alpm_realloc(data, current, newsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _alpm_alloc_fail(size_t size)
|
void _alpm_alloc_fail(size_t size)
|
||||||
|
|
Loading…
Add table
Reference in a new issue