[R] question about running out of memory on R

jim holtman jholtman at gmail.com
Tue Nov 6 00:42:57 CET 2007


Even when it does start using virtual memory (which you never want it
to do from a performance standpoint), there is still the physical
limitation (e.g., a 2-3GB on Windows depending on how you have it
configured) that you can not exceed.  Also the maximum memory is set
to:

--max-mem-size=N
(Windows only) Specify a limit for the amount of memory to be used
both for R objects and working areas. This is set by default to the
smaller of 1.5Gb24 and the amount of physical RAM in the machine, and
must be between 32Mb and 3Gb.

This is a parameter on the startup command.  On my machine I have 2GB
and let it default to 1.5GB.  This number should be less than the
physical memory on your system.  This is what is "runs out of".



On 11/5/07, Johan Jackson <johan.h.jackson at gmail.com> wrote:
> Hi all,
>
> R newbie, but have been reading the boards and learning lots. I have
> read all documents & list-serve responses I could about R and memory
> but still no answer.
>
> QUESTION:
>
> When the sizes of your objects exceeds your available RAM, R switches
> to Virtual Memory right? If so, why does it so often run out of memory
> and return an "unable to allocate XXX KB" error shortly after
> switching to virtual memory when there is PLENTY of virtual memory to
> be had (I think)?
>
> I have noticed this on both my mac and my pc, so it doesn't seem to be
> OS specific.
>
> Any help in understanding this would be most appreciated!
>
>
>  - J Jackson
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>


-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?



More information about the R-help mailing list