Wonder if it may be better to realloc to the next power of 2 to reduce memory fragmentation risks?