[R] Unable to allocate arrays of size > 2GB in 64 bit Windows 7 R

Duncan Murdoch murdoch.duncan at gmail.com
Mon Oct 25 12:45:58 CEST 2010


Bhattacharyya, Siddhartha wrote:
> I seem Unable to allocate arrays of size > around 2GB in 64 bit Windows 7
> R. There is a lot of main memory available. The memory.limit is set to the
> max memory available, and there is more than 10GB of that available when R
> returns an 'unable to allocate memory' error.   Is this a limitation of R
> even in 64 bit Windows 7?  Or is there a wY to get I've this?


There's currently a limit of 2^31-1 in the length of a vector in all 
versions, so that's the most entries you can have in a matrix as well.

The data in each entry is usually more than one byte, so the total size 
of allocation can be much bigger than 2 GB, but the number of entries can't.

Duncan Murdoch



More information about the R-help mailing list