This was not a memory leak: it just used more memory. That should have
been evident from your gc() results, which were not showing extra
memory usage.
It is already fixed in the current version of R, 1.4.1.
On Fri, 1 Feb 2002 ford@signal.qinetiq.com wrote:
> Full_Name: Ashley Ford
> Version: 1.4.0
> OS: Windows NT4
> Submission from: (NULL) (146.80.9.20)
>
>
> I am suffering from a memory leak in read.table in the new precompiled
windows
> 1.4.
> it works fine in 1.3
There are no such versions. This matters, as the problem does not
occur in 1.4.1, only 1.4.0, and the `new precompiled Windows 1.4' is in
fact 1.4.1.
> Create a 90000 line file of 7 variables eg
> perl -e '$e=exp(1);for($i=0;$i<90000;$i++){printf
"%d".(" %f"x6)."\n",
> $i,$i*$e,3,4,5,6,7,8,9}' > n90000
>
> R : Copyright 2001, The R Development Core Team
> Version 1.4.0 (2001-12-19)
>
> n9<-read.table("n90000")
> Error: cannot allocate vector of size 75 Kb
> In addition: Warning message:
> Reached total allocation of 63Mb: see help(memory.size)
> > gc()
> used (Mb) gc trigger (Mb)
> Ncells 206781 5.6 467875 12.5
> Vcells 109631 0.9 786432 6.0
>
> On a machine with 512Mb it takes over 10 minutes before running out of
memory
>
> On Version 1.3.1 (2001-08-31)
> it works fine
> date();n9<-read.table("n90000");date();str(n9)
> [1] "Tue Jan 29 20:41:30 2002"
> [1] "Tue Jan 29 20:43:29 2002"
> `data.frame': 90000 obs. of 7 variables:
> $ V1: num 2 3 4 5 6 7 8 9 10 11 ...
> $ V2: num 5.44 8.15 10.87 13.59 16.31 ...
> $ V3: num 3 3 3 3 3 3 3 3 3 3 ...
> $ V4: num 4 4 4 4 4 4 4 4 4 4 ...
> $ V5: num 5 5 5 5 5 5 5 5 5 5 ...
> $ V6: num 6 6 6 6 6 6 6 6 6 6 ...
> $ V7: num 7 7 7 7 7 7 7 7 7 7 ...
> > gc()
> used (Mb) gc trigger (Mb)
> Ncells 278967 7.5 984024 26.3
> Vcells 801283 6.2 2620390 20.0
>
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._