allocate sufficient memory