Error: cannot allocate vector of size 3.0 Gb