Split memory handling off auxlily.c, to new memory.c