Tuesday, 12 January 2010

GNU R Garbage Collection

On GNU R if you delete your objects by

rm(list=ls())

This action won't free any memory associated with those objects. For this reason, R provides a utility for garbage collection, simply apply

gc()

This will free not used allocations. If you like to apply this whenever R allocates memory, apply this:

gctorture(on = TRUE)

Consult with R Internals manual for further details.

No comments:

(c) Copyright 2008-2015 Mehmet Suzen (suzen at acm dot org)

Creative Commons Licence
This work is licensed under a Creative Commons Attribution 3.0 Unported License.