[R] R appears not to reallocate memory on linux

From: Lars <sich_at_gmx.de>
Date: Wed, 23 Apr 2008 10:55:27 +0200


I have a question concerning the memory management of R 2.6.1 on a 32-bit linux with 3.2 GB RAM.

Especially, I found the current memory size reported from gc() to be different from the amount reported by e.g. top. The 'max used' number of gc() seems more to match the actually used memory.

so is it the case that R keeps the allocated memory for its own memory manager and does not return it to the OS? this is what the situation looks like, although what i read in the newsgroups sounded like the opposite (e.g. R gives all unneeded memory back)

this is especially important for me since i am processing huge data and evaulate different learning methods, and i frequently ran into 'cannot allocate vector of (say) 70M'

any hint would be appreciated
thanks a lot


R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 23 Apr 2008 - 10:34:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 23 Apr 2008 - 11:30:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive