From Waclaw.Marcin.Kusnierczyk at idi.ntnu.no  Tue Nov 11 21:40:52 2008
From: Waclaw.Marcin.Kusnierczyk at idi.ntnu.no (Wacek Kusnierczyk)
Date: Tue, 11 Nov 2008 21:40:52 +0100
Subject: [Rd] error during list allocation
Message-ID: <4919EDD4.5070009@idi.ntnu.no>

platform       i686-pc-linux-gnu          
arch           i686                       
os             linux-gnu                  
system         i686, linux-gnu            
status                                    
major          2                          
minor          8.0                        
year           2008                       
month          10                         
day            20                         
svn rev        46754                      
language       R                          
version.string R version 2.8.0 (2008-10-20)


when i try to allocate a large list, i get the following error:

Error: vector memory exhausted (limit reached?)

the process uses over 80% memory, and cannot be stopped from within r
(it responds to whatever input with the same message as above); i need
to kill the process to release resources.

i think it would be practical to have the error reported *and* resources
freed when allocation fails.
the following should make a reproducible example:

x = 1:(10^9)
# Error: cannot allocate vector of size 3.7 Gb
# no problem otherwise

x = as.list(1:(10^8))
# Error: vector memory exhausted (limit reached?)
quit()
# Error: vector memory exhausted (limit reached?)
1
# Error: vector memory exhausted (limit reached?)

vQ



[Rd] error during list allocation
Wacek Kusnierczyk