I am trying to check what are the memory limits in the current version of R.
runtest <- function(size) { x <- "testme" while(0<1) { x <- c(x, x) size <<- object.size(x)
By running runtest(size) in the console on my laptop, I get the following error:
> runtest(size) Error: cannot allocate vector of size 4.0 Gb In addition: Warning messages: 1: In structure(.Call(C_objectSize, x), class = "object_size") : Reached total allocation of 7915Mb: see help(memory.size) 2: In structure(.Call(C_objectSize, x), class = "object_size") : Reached total allocation of 7915Mb: see help(memory.size) 3: In structure(.Call(C_objectSize, x), class = "object_size") : Reached total allocation of 7915Mb: see help(memory.size) 4: In structure(.Call(C_objectSize, x), class = "object_size") : Reached total allocation of 7915Mb: see help(memory.size) > size 2147483736 bytes >
This size looks very close to the 2 ^ 31-1 limit that people mentioned earlier. So, I tried to run the same code on our updated desktop with 128 GB of RAM and set a variable in the shortcut for the 64-bit version with a maximum memory capacity of 100 GB. This is the new error I get:
Error in structure(.Call(C_objectSize, ), class = "object_size"): long vectors not supported yet: unique.c: 1720 > size 8589934680 bytes >
Does this 8.5 GB limit have anything to do with running on Windows O / S (specifically Windows 7 Enterprise Edition)? I think the R help file ( http://stat.ethz.ch/R-manual/R-devel/library/base/html/Memory-limits.html ) explains this, but it's hard for me to understand what it says ( not my area of ββexpertise)
source share