[R-sig-Epi] memory over load?

FZ gerifalte28 at hotmail.com
Thu Aug 2 22:14:24 CEST 2007


Hi Thomas,

My experience in memory management in R is very limited so I am sure you 
are right, but how do you then explain the following behavior starting 
with a fresh session?

memory.size()# 12,000Kb
x=integer(100000000)
memory.size() #approx 412,000kb
rm(x)
memory.size()#still approx 412,000kb
gc()
memory.size()#down to approx 20,000Kb


I am running R version 2.5.1 (2007-06-27), i386-pc-mingw32

Thanks,

Francisco

Thomas Lumley wrote:
> On Thu, 2 Aug 2007, FZ wrote:
> 
>> This is not an epi question.  You may want to place it into the general
>> list.
>> If you were to do that, I would have pointed you to gc()  :-)
> 
> And more people would have been available to point out that gc() is not 
> the solution -- gc() is always run before allocating large chunks of 
> memory and before concluding that R is out of memory, so gc() will not 
> help.
> 
>         -thomas
> 
> 
>> Regards,
>>
>> Francisco
>>
>> Lynn Disney wrote:
>>> I have been running logistic regression on R and am getting memory
>>> overload issues. Is there a way to clear out the memory without
>>> restarting R so that I can save my work? I have tried already rm(model1)
>>> to remove the work from the first model so that I can run the second,
>>> but it doesn't clear out enough memory.
>>>
>>>
>>>
>>> Thanks.
>>>
>>>
>>>
>>> Lynn D. Disney, Ph.D., J.D., M.P.H.
>>>
>>> Research Analyst
>>>
>>>
>>>
>>>
>>>     [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-Epi at stat.math.ethz.ch mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-epi
>>>
>>>
>>>
>>>
>>
>> _______________________________________________
>> R-sig-Epi at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-epi
>>
> 
> Thomas Lumley            Assoc. Professor, Biostatistics
> tlumley at u.washington.edu    University of Washington, Seattle
> 
> 
> 
> 
> 
>



More information about the R-sig-Epi mailing list