Skip to content
Prev 247756 / 398503 Next

"cannot allocate vector of size ..." in RHLE5 PAE kernel

Dear Mauricio,

what I do not understand at all is the message:
Have you tried to allocate a big matrix in between, whith
the R - statement not being shown in the output? Probably
not. If not, your local R version is buggy for sure. The test shows 
that the OS imposes no artificial constraint on memory consumption, 
at least not up to ~ 1GB. But because you said that you're running a
32 - bit version of R (in a virtual machine?), the question is now 
wether gcc also compiles the test program as a 32 - bit program. I'm 
unsure because a 64 - bit system can be configured to compile and 
run programs using either environment. Regrettably I previously
did not include a test for that. 

--- snip ---
#include <stdio.h>
int main() {
        printf("The size of a pointer is %lu bytes\n", (unsigned long)sizeof(void *));
        return 0;
}
--- snip ---

If the program says "The size of a pointer is 4 bytes" then you're 
running the test program in a 32 bit environment.  Then the 
allocation problem could possibly be solved by recompiling/updating 
your R version. The system is called Redhat "Enterprise" Linux after
all, so  calling in Redhat support at that point and ask them to do 
something for their money should be an option.

Best 

Hugo
On Wednesday 19 January 2011 12:54:38 Mauricio Zambrano wrote: