moved MAT_ALLOCA def