[Rd] memory trouble

Jens Oehlschlägel joehl@web.de
Wed, 3 Jan 2001 17:02:33 +0100


I don't know whether this belongs to r-devel or rather r-help.

Under RW1.11 --nsize=8M --vsize=512M I could

n <- 500000
m <- 20
x <- matrix(rnorm(n*m), ncol=m, nrow=n)
gc()

> n <- 500000
> m <- 20
> x <- matrix(rnorm(n*m), ncol=m, nrow=n)
> gc()
           free    total (Mb)
Ncells  8190509  8388608  160
Vcells 57033698 67108864  512


# under RW1.20 --vanilla the same fails, some testing shows

n <- 500000
m <- 20

x <- matrix(ncol=m, nrow=n)
x <- matrix(NA, ncol=m, nrow=n)
x <- matrix(0, ncol=m, nrow=n)
x <- matrix(rep(NA, n*m), ncol=m, nrow=n)
x <- matrix(rep('0', n*m), ncol=m, nrow=n)
x <- matrix(rep(0, n*m), ncol=m, nrow=n)
x <- matrix(rep('0', n*m), ncol=m, nrow=n)
gc()
x <- matrix(rep('0', n*m), ncol=m, nrow=n)
x <- matrix(rnorm(n*m), ncol=m, nrow=n)

> n <- 500000
> m <- 20
> 
> x <- matrix(ncol=m, nrow=n)
> x <- matrix(NA, ncol=m, nrow=n)
> x <- matrix(0, ncol=m, nrow=n)
> x <- matrix(rep(NA, n*m), ncol=m, nrow=n)
> x <- matrix(rep('0', n*m), ncol=m, nrow=n)
Error: cannot allocate vector of size 39062 Kb
> x <- matrix(rep(0, n*m), ncol=m, nrow=n)
Error: cannot allocate vector of size 78125 Kb
> x <- matrix(rep('0', n*m), ncol=m, nrow=n)
Error: cannot allocate vector of size 39062 Kb
> gc()
           used (Mb) gc trigger  (Mb)
Ncells   174208  4.7     350000   9.4
Vcells 11109574 84.8   24307903 185.5
> x <- matrix(rep('0', n*m), ncol=m, nrow=n)
> x <- matrix(rnorm(n*m), ncol=m, nrow=n)
Error: cannot allocate vector of size 78125 Kb


Experimenting with --min-nsize=8M --min-vsize=512M --max-nsize=8M --max-vsize=512M did not help. 

What am I doing wrong?


Regards


Jens Oehlschlägel
(Research Consultant)


PIII NT4.0 Service Pack 6, 1 GB RAM, Physical Memory available due to task manager: 934600 K

> version
         _              
platform i386-pc-mingw32
arch     x86            
os       Win32          
system   x86, Win32     
status                  
major    1              
minor    2.0            
year     2000           
month    12             
day      15             
language R  
_______________________________________________________________________
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
IhrName@web.de, 8MB Speicher, Verschluesselung - http://freemail.web.de


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._