[R] How to free memory used by R.

Thomas Lumley tlumley at u.washington.edu
Mon Sep 1 19:42:06 CEST 2003

On Mon, 1 Sep 2003, Lariani,Sofiane,LAUSANNE,NRC/BAS wrote:

> Hi,
> I want to free memory used by R. The usage of rm and gc give no result. I'm
> running  an algorithm consuming a huge memory and I need to recover the
> memory used by R between 2 call of my algorithm.
> Thank you in advance for your help.

There is no portable way (and often no way at all) for a program to return
memory to the operating system.

On the other hand, a competent virtual memory system will page unused
memory to disk fairly quickly, which has more or less the same effect
unless you are short of disk space.


More information about the R-help mailing list