[R] gc() and gc trigger

From: Pavel Khomski <pkhomski_at_wiwi.uni-bielefeld.de>
Date: Sat 11 Jun 2005 - 03:00:56 EST


hello,

the question concerning to the memory used and g.c. after having removed objects. What is wrong?

bevor


> gc()

                   used   (Mb)     gc trigger       (Mb)     max 
used      (Mb)
Ncells   313142     8.4         1801024         48.1       1835812      
  49.1
Vcells    809238     6.2     142909728   1090.4   178426948   1361.3



hier all attached objects detached and other no more used ones removed; also the objects which could change their size (like .Traceback) are checked; nothing unusual


after


> for (i in 1:30) gc()
> gc()

                      used    (Mb)     gc trigger      (Mb)      max 
used      (Mb)
Ncells     313149        8.4       1152655       30.8          1835812   
    49.1
Vcells      809261        6.2       3218039       19.7     178426948   
1361.3

> object.size(mget(ls(all=T),envir=.GlobalEnv)) / 1024^2
[1] 9.829926

N.B.!!! the "max used " is not put back

> q()

after having restarted R-prozess


> gc()

                   used    (Mb)      gc trigger   (Mb)     max used      
(Mb)
Ncells  302497        8.1           467875    12.5          350000       
  9.4
Vcells   785346        6.0         1193335      9.2           
923612        7.1



thnks for hint

ps: some more understandable information about how R manages the memory and to the output of gc(), specially about gc trigger would be helpful



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jun 11 03:08:51 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:30 EST