Skip to content
Prev 55658 / 398500 Next

calculating memory usage

Many thanks to Prof. Ripley. The problem is that memory.profile does not
exist in *nix environment and there is probably a very good reason why.

I was reading help(Memory) and in the Details section :
     You can find out the current memory consumption (the heap and cons
     cells used as numbers and megabytes) by typing 'gc()' at the R
     prompt.

AFAICS, Ncells is the fixed memory used by the underlying R and Vcells
is the variable part and depends on the calculations. 

Would I be able to say that the generating 10 million random numbers
requires approximately 73.4 Mb (= 26.3 + 80.5 - 26.3 - 7.1) of memory ?
I double checked this against memory.size() in Windows and they seem to
agree. Thank you.
used (Mb) gc trigger (Mb)
Ncells 456262 12.2     984024 26.3
Vcells 122697  1.0     929195  7.1
used (Mb) gc trigger (Mb)
Ncells   456274 12.2     984024 26.3
Vcells 10123014 77.3   10538396 80.5
On Mon, 2004-09-13 at 18:47, Prof Brian Ripley wrote: