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

Dirk Eddelbuettel edd at debian.org
Fri Oct 28 05:55:13 CEST 2011


On 28 October 2011 at 14:34, Slava Razbash wrote:
| Hello Dirk and Rcpp-devel list,
| 
| I commented out everything in the RcppArmadillo / fastLm() function
| and add the line:
| return R_NilValue;
| I still get the same behaviour where gc() does not free as much memory
| as for() { .Call() } caused it to use.
| Could it be that I am just observing some component of RcppArmadillo
| being loaded into memory?

Doubtful. 

Compilers and linker don't normally include code that is not executed.

| I also tried in R:
| for(i in 1:999999) { a <-list(w=matrix(c(1:14),1,14),
| w.transpose=matrix(c(1:14), 14, 1) )  }
| In this case, all of the extra memory used is freed with a call to gc().

i)   Without reproducible code, there is very little we can say here.

ii)  See the 'Writing R Extensions' manual and the hints about valgrid, if you
     really suspect leakage valgrind normally finds it.

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


More information about the Rcpp-devel mailing list