Commit 5dde103a authored by Nikias Bassen's avatar Nikias Bassen

ptrarray: Allow larger chunks for buffer reallocation

parent 5bf95e9a
......@@ -25,7 +25,7 @@ ptrarray_t *ptr_array_new(int capacity)
ptrarray_t *pa = (ptrarray_t*)malloc(sizeof(ptrarray_t));
pa->pdata = (void**)malloc(sizeof(void*) * capacity);
pa->capacity = capacity;
pa->capacity_step = (capacity > 64) ? 64 : capacity;
pa->capacity_step = (capacity > 4096) ? 4096 : capacity;
pa->len = 0;
return pa;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment