bug in garbage collector function gc() documentation (PR#1970)

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Sun, 1 Sep 2002 08:29:35 +0100 (BST)


The help page is correct: please read it more carefully:

     `gc' returns a matrix with rows `"Ncells"' (cons cells, usually 28
     bytes each on 32-bit systems and 56 bytes on 64-bit systems, and
     `"Vcells"' (vector cells, 8 bytes each), and columns `"used"' and
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
    `"gc trigger"', each also interpreted in megabytes (rounded up to
     the next 0.1Mb).

`30158416 bytes' is your invention: gc() actually reports `30158416
Vcells'.


On Sat, 31 Aug 2002 joshi@engr.orst.edu wrote:

> Full_Name: Saket Joshi
> Version: 1.5.0
> OS: Solaris 5.8
> Submission from: (NULL) (128.193.38.91)
>
>
> According to the documentation obtained by entering: help.search("gc"), the
> command gc() forces garbage collection and gives the memory usage statistics
> along with the trigger values in bytes also interpretted in megabytes. However
> when I ran gc(), the result was a list giving the memory usage in bytes and
> interpretted in Megabits and not mega bytes.

It *is* matrix as stated, and not a list!

> e.g.
>
> > gc()
>
> 	   used  (Mb) gc trigger  (Mb)
> Ncells   288733   7.8     818163  21.9
> Vcells 30158416 230.1   48892294 373.1
>
> As can be seen, 230.1 is the interpretation of 30158416 bytes as megabits. But
> the documentation says megabytes.


-- 
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._