Skip to content

R as 64 bit application

3 messages · Paul Gilbert, Thomas Lumley, Brian Ripley

#
In a package test I have a problem that needs over 4G of memory. This requires
that I use R compiled as a 64 bit application. Is there a way within R to test
if R has been compile as a 64 bit application? This would allow me to
automatically skip the test when I know it is going to fail.

Thanks,
Paul Gilbert
#
On Thu, 15 May 2003, Paul Gilbert wrote:

            
I don't think so.  You could use a simple C function


  void is64bit (int *sizeptr){
	*sizeptr = sizeof sizeptr ==8;
	return;
	}


  is64bit<-function(){
	.C("is64bit",logical(1))[[1]]
	}


	-thomas
#
On Thu, 15 May 2003, Thomas Lumley wrote:

            
You could call object.size:
[1] 28
[1] 56

or you could look at the results of gc():
[1] 56.05374

and it's about 28 on a 32-bit system.