Hi,
Ideally, one wouldn't allocate in "high" ram and then go on to free it. (Memory fragmentation due to malloc/free could chew up some guest ram.) So, I'm not sure this is an improvement.
So, we can keep the realloc but move tmp -> high instead of tmp -> low.
cheers, Gerd