| Line 5... |
Line 5... |
| 5 |
gcinfo(verbose)
|
5 |
gcinfo(verbose)
|
| 6 |
}
|
6 |
}
|
| 7 |
\alias{gc}
|
7 |
\alias{gc}
|
| 8 |
\alias{gcinfo}
|
8 |
\alias{gcinfo}
|
| 9 |
\arguments{
|
9 |
\arguments{
|
| 10 |
\item{verbose}{logical; if \code{TRUE}, the garbage collection prints
|
10 |
\item{verbose}{logical; if \code{TRUE}, the garbage collection prints
|
| 11 |
statistics about cons cells [in Bytes] and the vector heap [in KBytes].}
|
11 |
statistics about cons cells and the vector heap.}
|
| 12 |
}
|
12 |
}
|
| 13 |
\description{
|
13 |
\description{
|
| 14 |
A call of \code{gc} causes a garbage collection to take place.
|
14 |
A call of \code{gc} causes a garbage collection to take place.
|
| 15 |
\code{gcinfo} sets a flag so that
|
15 |
\code{gcinfo} sets a flag so that
|
| 16 |
automatic collection is either silent (\code{verbose=FALSE}) or
|
16 |
automatic collection is either silent (\code{verbose=FALSE}) or
|
| 17 |
prints memory use statistics (\code{verbose=TRUE}).
|
17 |
prints memory usage statistics (\code{verbose=TRUE}).
|
| 18 |
}
|
18 |
}
|
| 19 |
\details{
|
19 |
\details{
|
| 20 |
A call of \code{gc} causes a garbage collection to take place.
|
20 |
A call of \code{gc} causes a garbage collection to take place.
|
| 21 |
This takes place automagically without user intervention, and the
|
21 |
This takes place automatically without user intervention, and the
|
| 22 |
primary purpose of calling \code{gc} is for the report on memory usage.
|
22 |
primary purpose of calling \code{gc} is for the report on memory usage.
|
| - |
|
23 |
|
| - |
|
24 |
However, it can be useful to call \code{gc} after a large object
|
| - |
|
25 |
has been removed, as this may prompt \R to return memory to the
|
| - |
|
26 |
operating system.
|
| 23 |
}
|
27 |
}
|
| - |
|
28 |
|
| 24 |
\value{
|
29 |
\value{
|
| 25 |
\code{gc} returns a 2*4 matrix with rows \code{"Ncells"} (\emph{cons
|
30 |
\code{gc} returns a matrix with rows \code{"Ncells"} (\emph{cons
|
| 26 |
cells}, usually 28 bytes each on 32-bit systems, and \code{"Vcells"}
|
31 |
cells}, usually 28 bytes each on 32-bit systems and 56 bytes on
|
| - |
|
32 |
64-bit systems, and \code{"Vcells"} (\emph{vector cells}, 8 bytes
|
| 27 |
(\emph{vector cells}, 8 bytes each), and columns \code{"used"},
|
33 |
each), and columns \code{"used"} and \code{"gc trigger"},
|
| 28 |
\code{"total"}, each also interpreted in megabytes (rounded up to
|
34 |
each also interpreted in megabytes (rounded up to the next 0.1Mb).
|
| 29 |
the next 0.1Mb).
|
- |
|
| 30 |
|
35 |
|
| 31 |
If maxima have been set for either \code{"Ncells"} or \code{"Vcells"},
|
36 |
If maxima have been set for either \code{"Ncells"} or \code{"Vcells"},
|
| 32 |
a fifth column is printed giving the current limits in Mb (with
|
37 |
a fifth column is printed giving the current limits in Mb (with
|
| 33 |
\code{NA} denoting no limit).
|
38 |
\code{NA} denoting no limit).
|
| 34 |
|
39 |
|