Re: [R] Memory hungry routines

2014-12-30 Thread ALBERTO VIEIRA FERREIRA MONTEIRO
Thanks to Duncan, Hadley and Henrik. Duncan, I used Rprof and could pinpoint the critical routine that was doing the memory crash. Henrik, you got it right: the culprit was a big matrix of integers, but where some of its fields are filled with -Inf and Inf. This matrix is global, it's used only o

Re: [R] Memory hungry routines

2014-12-29 Thread Henrik Bengtsson
On Mon, Dec 29, 2014 at 10:52 AM, ALBERTO VIEIRA FERREIRA MONTEIRO wrote: > Is there any way to detect which calls are consuming memory? > > I run a program whose global variables take up about 50 Megabytes of > memory, but when I monitor the progress of the program it seems to > allocating 150 Me

Re: [R] Memory hungry routines

2014-12-29 Thread Hadley Wickham
You might find the advice at http://adv-r.had.co.nz/memory.html helpful. Hadley On Tue, Dec 30, 2014 at 7:52 AM, ALBERTO VIEIRA FERREIRA MONTEIRO wrote: > Is there any way to detect which calls are consuming memory? > > I run a program whose global variables take up about 50 Megabytes of > memory

Re: [R] Memory hungry routines

2014-12-29 Thread Duncan Murdoch
On 29/12/2014 1:52 PM, ALBERTO VIEIRA FERREIRA MONTEIRO wrote: > Is there any way to detect which calls are consuming memory? The Rprofmem() function can do this, but you need to build R to enable it.Rprof() does a more limited version of the same thing if run with memory.profiling = TRUE. Du

[R] Memory hungry routines

2014-12-29 Thread ALBERTO VIEIRA FERREIRA MONTEIRO
Is there any way to detect which calls are consuming memory? I run a program whose global variables take up about 50 Megabytes of memory, but when I monitor the progress of the program it seems to allocating 150 Megabytes of memory, with peaks of up to 2 Gigabytes. I know that the global variable