ELEMSPERCHUNK
if ((*count % ELEMSPERCHUNK) == 0) {
p = realloc(vec, (*count + ELEMSPERCHUNK) * esize);