preliminary memory allocation & pte handling