Re: [R] gc() vs memory.profile()

2013-12-27 Thread Ross Boylan
On Fri, 2013-12-27 at 16:47 -0600, Hadley Wickham wrote: > For your original case, you may find it more useful to do memory + > line profiling (e.g. as visualised by > https://github.com/hadley/lineprof) to figure out what's going on. > > Hadley I've been trying memory and line profiling, but mem

Re: [R] gc() vs memory.profile()

2013-12-27 Thread Hadley Wickham
Hi Ross, It's not obvious how useful memory.profile() is here. I created the following little experiment to help me understand what memory.profile() is showing (and to make it easier to see the changes), but it's left me more confused than enlightened: m_delta <- function(expr) { # Evaluate in

[R] gc() vs memory.profile()

2013-12-27 Thread Ross Boylan
I am trying to understand why a function causes my memory use to explode. While doing that I noticed that my memory use as reported by gc() is growing, but the results of memory.profile() are almost unchanged (the count for raw grew by 3). How can the two functions produce different results, and