switechd order of memory allocation