[R] Windows Memory Issues

Thomas Lumley tlumley at u.washington.edu
Tue Dec 9 20:40:23 CET 2003


On Tue, 9 Dec 2003 Benjamin.STABLER at odot.state.or.us wrote:

> Thanks for the reply.  So are you saying that multiple calls to gc() frees
> up memory to Windows and then other processes can use that newly freed
> memory?

No.  You typically can't free memory back to Windows (or many other OSes).


>		 So multiple calls to gc() does not actually make more memory
> available to new R objects that I might create.

Yes and no. It makes more memory available, but only memory that would
have been made available in any case if you had tried to use it.  R calls
the garbage collector before requesting more memory from the operating
system and before running out of memory.


>					  The reason I ask is because
> I want to know how to use all the available memory that I can to store
> object in R.  ?gc says that garbage collection is run without user
> intervention so there is really nothing I can do to improve memory under
> Windows except increase the --max-mem-size at startup

You can't do anything else to make more memory available, only to use
less.

	-thomas




More information about the R-help mailing list