enum memory regions; process protection flag check; minor improvements