[Rd] garbage collection & memory leaks in 'R', it seems...

From: Mike Williamson <this.is.mvw_at_gmail.com>
Date: Fri, 16 Jul 2010 16:24:53 -0700


ink1">Hello developers,

    I noticed that if I am running 'R', type "rm(list=objects())" and
"gc()", 'R' will still be consuming (a lot) more memory than when I then
close 'R' and re-open it. In my ignorance, I'm presuming this is something in 'R' where it doesn't really do a great job of garbage collection... at least not nearly as well as Windows or unix can do garbage collection.

    Am I right? If so, is there any better way to "clean up" the memory that 'R' is using? I have a script that runs a fairly large job, and I cannot keep it going on its own in a convenient way because of these remnants of garbage that pile up and eventually leave so little memory remaining that the script crashes.

    I have attached a screen shot of the "system performance" screen on the 64-bit windows machine (with 64-bit 'R') that I am using. I labeled portions of it before closing 'R' and after re-opening it (loading up the same saved image) to show the large difference in memory being consumed. Below are the details of my version of 'R'. Thanks for any help!!

                                Thanks,
                                        Mike


R version: Win-64bit version, 2.11.1 (the machine I'm using has 20 GB of memory, so that's my memory limit since it's 64 bit version) packages: see below...

             Package        Version
brew         "brew"         "1.0-3"
colorspace   "colorspace"   "1.0-1"
corpcor      "corpcor"      "1.5.6"
digest       "digest"       "0.4.2"
fdrtool      "fdrtool"      "1.2.6"
GeneCycle    "GeneCycle"    "1.1.1"
ggplot2      "ggplot2"      "0.8.7"
longitudinal "longitudinal" "1.1.5"
MASS         "MASS"         "7.3-6"
plyr         "plyr"         "0.1.9"
proto        "proto"        "0.3-8"
qvalue       "qvalue"       "1.22.0"
R.methodsS3  "R.methodsS3"  "1.2.0"
R.oo         "R.oo"         "1.7.3"
R.utils      "R.utils"      "1.4.3"
randomForest "randomForest" "4.5-35"
RColorBrewer "RColorBrewer" "1.0-2"
reshape      "reshape"      "0.8.3"
RODBC        "RODBC"        "1.3-1"
sos          "sos"          "1.3-0"
base         "base"         "2.11.1"
boot         "boot"         "1.2-42"
class        "class"        "7.3-2"
cluster      "cluster"      "1.12.3"
codetools    "codetools"    "0.2-2"
datasets     "datasets"     "2.11.1"
foreign      "foreign"      "0.8-40"
graphics     "graphics"     "2.11.1"
grDevices    "grDevices"    "2.11.1"
grid         "grid"         "2.11.1"
KernSmooth   "KernSmooth"   "2.23-3"
lattice      "lattice"      "0.18-8"
MASS         "MASS"         "7.3-6"
Matrix       "Matrix"       "0.999375-39"
methods      "methods"      "2.11.1"
mgcv         "mgcv"         "1.6-2"
nlme         "nlme"         "3.1-96"
nnet         "nnet"         "7.3-1"
rpart        "rpart"        "3.1-46"
spatial      "spatial"      "7.3-2"
splines      "splines"      "2.11.1"
stats        "stats"        "2.11.1"
stats4       "stats4"       "2.11.1"
survival     "survival"     "2.35-8"
tcltk        "tcltk"        "2.11.1"
tools        "tools"        "2.11.1"
utils        "utils"        "2.11.1"




"Telescopes and bathyscaphes and sonar probes of Scottish lakes,
Tacoma Narrows bridge collapse explained with abstract phase-space maps, Some x-ray slides, a music score, Minard's Napoleanic war: The most exciting frontier is charting what's already here."

--
Help protect Wikipedia. Donate now:
http://wikimediafoundation.org/wiki/Support_Wikipedia/en

______________________________________________ R-devel_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Capture.PNG
Received on Sat 17 Jul 2010 - 07:34:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 17 Jul 2010 - 11:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive