[R] Determining the maximum memory usage of a function

2013-06-20 Thread Jonathan Greenberg
Folks: I apologize for the cross-posting between r-help and r-sig-hpc, but I figured this question was relevant to both lists. I'm writing a function to be applied to an input dataset that will be broken up into chunks for memory management reasons and for parallel execution. I am trying to

Re: [R] Determining the maximum memory usage of a function

2013-06-20 Thread jim holtman
What I would do is to use memory.size() to get the amount of memory being used. Do a call at the beginning of the function to determine the base, and then at other points in the code to see what the difference from the base is and keep track of the maximum difference. I am not sure if just

Re: [R] Determining the maximum memory usage of a function

2013-06-20 Thread Prof Brian Ripley
On 20/06/2013 15:45, Jonathan Greenberg wrote: Folks: I apologize for the cross-posting between r-help and r-sig-hpc, but I figured this question was relevant to both lists. I'm writing a function to be applied to an input dataset that will be broken up into chunks for memory management

Re: [R] Determining the maximum memory usage of a function

2013-06-20 Thread Jonathan Greenberg
Jim: Thanks, but I'm looking for something that can be used somewhat automatically -- the function in question would be user-provided and passed to my chunking algorithm, so in this case it would be the end-user (not me) who would have to embed these -- would Rprof(memory.profiling=TRUE) # my