Learn R Programming

snpEnrichment (version 1.7.0)

GC: Full Garbage Collection

Description

GC performs garbage collection until free memory indicators show no change.

Usage

GC(verbose = getOption("verbose"), reset=FALSE)

Arguments

verbose
[logical]: if TRUE, the garbage collection prints statistics about cons cells and the space allocated for vectors.
reset
[logical]: if TRUE the values for maximum space used are reset to the current values.

Value

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).If maxima have been set for either "Ncells" or "Vcells", a fifth column is printed giving the current limits in Mb (with NA denoting no limit).The final two columns show the maximum space used since the last call to GC(reset=TRUE) (or since R started).

See Also

The R Internals manual.

Memory on R's memory management, and gctorture if you are an R developer.

reg.finalizer for actions to happen at garbage collection.

Examples

Run this code
GC() # - do it now
x <- integer(100000); for(i in 1:18) x <- c(x,i)
GC(TRUE)
GC(reset=TRUE)

Run the code above in your browser using DataLab