[R] A question about gc()

Tong Wang wangtong at usc.edu
Wed Sep 6 10:24:46 CEST 2006


Yes, I am using R in windows, sorry for not being specific. 
You are right, I have stored too much stuff, and I need to trash some data in the process. 
Problem solved for me, Thank you very much. 

tong

----- Original Message -----
From: Prof Brian Ripley <ripley at stats.ox.ac.uk>
Date: Tuesday, September 5, 2006 3:42 am
Subject: Re: [R] A question about gc()
To: Tong Wang <wangtong at usc.edu>
Cc: R help <r-help at stat.math.ethz.ch>

> On Tue, 5 Sep 2006, Tong Wang wrote:
> 
> > Hi everyone, 
> 
> >     I am doing some intensive computation:  50000 regressions of 
> the 
> > form Y~X with each y of size (1,1000) , even if I break invoke 
> gc() for 
> > a few time in the loop, it still breaks down at some point with 
> the 
> > error message:
> 
> gc() does not reclaim memory for you beyond what R has already done.
> 
> > Error in .signalSimpleWarning("Reached total allocation of 
> 1024Mb: see help(memory.size)",  : 
> >         recursive default argument reference
> 
> >  After getting this, even if I call gc() and resume the 
> computation, it 
> > won't move at all. May I get some suggestions what should I do to 
> get 
> > around this problem ?
> 
> Consult the rw-FAQ (since you seem to be using Windows without 
> telling us) 
> and the help page the message mentions.
> 
> It looks as if you are trying to store too many objects.  If you 
> have lots 
> of RAM you can increase that limit (see the previous para), but you 
> are 
> getting uncomfortably close to the address space limit of your OS.
> 
> Perhaps you can only save the part of the fit you need, or save() 
> the 
> objects to separate files and rm() them, and postprocess them in a 
> later 
> session?
> 
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>



More information about the R-help mailing list