Expanding rows (and especially row arrays) can lead to fragmentation in the memory manager. Some ideas that were discussed to improve this:
- Make sure we use realloc calls when we can
- Make sure that we are prepared to expand into adjacent free blocks on realloc calls (both above and below)
- Allocate the huge blocks at the bottom of the heap rather than the top, to increase the chances of being able to do a realloc without copying
Expanding rows (and especially row arrays) can lead to fragmentation in the memory manager. Some ideas that were discussed to improve this: