[R] gc() and gc trigger
Pavel Khomski
pkhomski at wiwi.uni-bielefeld.de
Fri Jun 10 19:00:56 CEST 2005
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
More information about the R-help
mailing list