Re: [R] 1.2.2 under M$ windows 2000 lots of plots out of memory?

About this list Date view Thread view Subject view Author view

From: Uwe Ligges (ligges@statistik.uni-dortmund.de)
Date: Tue 13 Mar 2001 - 03:57:34 EST


Message-ID: <3AAD0E0E.FC60D834@statistik.uni-dortmund.de>

Bob Sandefur wrote:
>
> hi-
> If I source the following
>
> for(k in seq(1:20)){
> x<-runif(20000,min=-500,max=2000)
> y<-runif(20000,min=-500,max=2500)
> z<-runif(20000,min=-10,max=10)
> cat(k,"file",memory.size())
> cc<-rainbow(11)
> plot(x,y,asp=1i,xlim=c(-500,2000),ylim=c(-500,2500),main=k,cex=1.0)
> for(i in seq(-10,10,2)){
> points(x[z > i],y[z > i],col=cc[(12+i)/2],cex=1.0)
> }
> rm(x,y,z)
> cat(k,"fil2",memory.size(),"\n")
> #readline(prompt="enter for nextplot")
> dev.off()
> }
> ~
> the check print gets to 256MB and R fails; I think I am freeing everthing with the rm(...) and dev.off().
> Am I failing to free something or force r to do garbage collection?

Interesting. On NT4.0 R consumes about 20MB at all and does garbage
collection.
Output from you function:

1 file 94173681 fil2 14067880
2 file 145127522 fil2 14284016
3 file 120852243 fil2 13324928
...
20 file 1329924020 fil2 12662432

> I start r with
>
> P:\r\base\rw1022\bin\rgui.exe --vsize=300M --nsize=20000k
> and turn of buffered output

These options are not neccessary in R-1.2.2, have a look at ?Memory:
"For backwards compatibility, options --nsize and --vsize are equivalent
to --min-nsize and --min-vsize. "
So you told R to use a minimal vsize of 300M.

On the other hand "The default [of max-mem-size] is the smaller of the
amount of physical RAM in the machine and 256Mb".

This explains it all, I think.

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:36 EST