save memory allocation