[R] R appears not to reallocate memory on linux

Lars sich at gmx.de
Wed Apr 23 10:55:27 CEST 2008


Hi,

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

lars



More information about the R-help mailing list