[R] memory limit problem

James MacDonald jmacdon at med.umich.edu
Sun Apr 4 00:37:33 CEST 2004


If you check the max memory used, I bet it is the same as your
memory.limit. Try

memory.size(max=TRUE)

to see how much memory was allocated. You also might try
--max-mem-size=2000M. R will not actually be able to get all 2 Gb of
ram, but I think it will be more than 1.5 Gb you are allowing now.

Jim



James W. MacDonald
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623

>>> "Yi-Xiong Sean Zhou" <yzhou at sdsc.edu> 04/03/04 04:49PM >>>
After memory.limit(1500), the error message still pop out:

Error: cannot allocate vector of size 11529 Kb

While 

> memory.size()
[1] 307446696
> memory.limit()
[1] 1572864000

And the system is only using 723MB physical memory, while 2G is the
total. 

Does anyone have a clue of what is going on? 


Yi-Xiong


-----Original Message-----
From: Uwe Ligges [mailto:ligges at statistik.uni-dortmund.de] 
Sent: Saturday, April 03, 2004 12:40 PM
To: Yi-Xiong Sean Zhou
Cc: r-help at stat.math.ethz.ch 
Subject: Re: [R] memory limit problem



Yi-Xiong Sean Zhou wrote:
> 
> Could anyone advise me how to allocate 1.5Gbyte memory for R on a
Dell
> laptop running XP professional with 2G memory?

See ?Memory or the the R for Windows FAQ, which tells you:

"2.7 There seems to be a limit on the memory it uses!

Indeed there is. It is set by the command-line flag --max-mem-size
(see
How do I install R for Windows?) and defaults to the smaller of the
amount of physical
RAM in the machine and 1Gb. [...]"


> I have tried
> 
> "C:\Program Files\R\rw1081\bin\Rgui.exe" --max-vsize=1400M
> 
> but I only get only 500MB for R actually.
> 
>
> I also tried memory.limit(2^30) in R and got error of:

Well, you don't want to allocate 2^30 *Mega*Bytes (see ?memory.limit),
do you? 


Either use the command line flag --max-mem-size=1500M or within R:
 memory.limit(1500)

 
> 
> Error in memory.size(size) : cannot decrease memory limit

Since your limit was roughly 10^6-times off the right one, you got an
integer overflow internally, I think.

Uwe Ligges


 
> Yi-Xiong
> 
>         [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help 
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html 

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help 
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html




More information about the R-help mailing list