So the real purpose of arena_realloc is to figure out if we can get away with just adjusting the region that the pointer given resides in so that we don't need to _actually_ allocate any new memory. The previous implementation did this in the special case where the pointer given _is_ the entire region. But we can adjust the region's size _if_ the pointer given is the last allocation on the region i.e. it's on the tail end.
6.5 KiB
6.5 KiB