[Rcpp-devel] Have I noticed memory management bug in RcppArmadillo or is this the intended behaviour?

Davor Cubranic cubranic at stat.ubc.ca
Wed Nov 2 01:35:02 CET 2011


Cool, glad to have gotten down to the bottom of this.

Davor


On October 30, 2011 08:48:10 PM Slava Razbash wrote:
> Drik, Davor,
> 
> I don't think that what I was observing was a memory leak.
> 
> I have ran the functions provided by Dirk. I have also used gc() as
> suggested by Davor. The memory "used", as reported by gc(), was the
> same before and after running fRcppArma() in a loop. Although the
> amount reported by Task Manager was different. However, in this:
> http://stackoverflow.com/questions/6311962/tracking-memory-usage-and-garbag
> e-collection-in-r StackOverflow post, where Martin Morgan writes that "at
> times the task manager's notion of memory use might not accurately reflect
> the memory actually in use by R".
> 
> For fRcpp() and fRC(), there is a very slight difference in memory
> "used" before and after gc().
> 
> 
> I also ran the functions in the order: fRC(), fRcpp() and fRcppArma()
> all in one R session. The memory usage reported by Task Manager
> increased most for fRC(), less for fRcpp() and even less for
> fRcppArma().
> 
> Memory used by fRcpp() and fRcppArma() did not increase with time.
> fRC() cause task manager to report two step-ups in memory usage.
> 
> Thank you,
> 
> Slava
> 
> On Sun, Oct 30, 2011 at 12:59 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
> > On 28 October 2011 at 16:38, Davor Cubranic wrote:
> > | Instead of looking at Task Manager or Top, could you also look at the
> > | output of "gc(TRUE)" before and after running the microbenchmark?
> > | 
> > | Or even use mallinfo for full details of memory allocations
> > | (http://rforge.net/mallinfo/files/, and there is a thread illustrating
> > | its use at http://thread.gmane.org/gmane.comp.lang.r.devel/28945).
> > 
> > Go ahead, I await your results :)
> > 
> > I already wrote three emails explaining that I cannot see the error that
> > Slava reports...
> > 
> > Dirk
> > 
> > --
> > "Outside of a dog, a book is a man's best friend. Inside of a dog, it is
> > too dark to read." -- Groucho Marx
> > _______________________________________________
> > Rcpp-devel mailing list
> > Rcpp-devel at lists.r-forge.r-project.org
> > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


More information about the Rcpp-devel mailing list