Windows Memory Issues
On Tue, 9 Dec 2003, Thomas Lumley wrote:
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).
At least using R under Windows NT/2000/XP you can. I've watched it do so whilst fixing memory leaks. There is another complication here: R for Windows uses a third-party malloc, and you can free memory back to that if not to the OS. The reason Windows is special is the issue of fragmentation, which OSes using mmap (and R-devel under Windows) typically do not suffer.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595