if the input rawXmem is too big, cov will cause out of memory, fixed it.