[R-SIG-Mac] malloc problem R2.6.1 on leopard

Thomas Lumley tlumley at u.washington.edu
Mon Dec 3 17:33:10 CET 2007


Just one additional note.  This is where the 'max used' column in the 
output of gc() is helpful. The error message told you the size of the 
failed malloc attempt, gc() would tell you how much memory you had 
allocated at that point.

 	-thomas

On Sun, 2 Dec 2007, Benilton Carvalho wrote:

> The first thing to notice is that:
>
> ?expand.grid
>
> might be useful...
>
> The second is that:
>
> allsubsets(30) will return you an object of 2^30 rows by 30 columns....
>
> How big would an object like that be???
>
> 4*(2^30)*30/(1024^3) = 120GB....
>
> b
>
> On Nov 30, 2007, at 11:17 AM, Hans Kestler wrote:
>
>> Hi,
>> I just installed the latest release (2.6.1) on Leopard (Mac Pro - Quad-Core
>> Intel Xeon, 16Gb).
>> Calling :
>> 
>> allsubsets <- function (n)
>> +   {
>> +     if (n > 0)
>> +       rbind(cbind(TRUE, Recall(n - 1)), cbind(FALSE, Recall(n -1)))
>> +   }
>>> a<-allsubsets(30)
>> 
>> I get the following error:
>> 
>> Error: cannot allocate vector of size 1.5 Gb
>> 
>> R(576,0xa04f8f60) malloc: *** mmap(size=1610616832) failed (error code=12)
>> *** error: can't allocate region
>> *** set a breakpoint in malloc_error_break to debug
>> R(576,0xa04f8f60) malloc: *** mmap(size=1610616832) failed (error code=12)
>> *** error: can't allocate region
>> *** set a breakpoint in malloc_error_break to debug
>> 
>> Any ideas? Thank you.
>> 
>> Hans
>>
>> 	[[alternative HTML version deleted]]
>> 
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle



More information about the R-SIG-Mac mailing list