Allocate adequate space for permutation