Re: [Rcpp-devel] R session crashes when largely using a Rcpp sourced function

2014-10-08 Thread Jonathan Olmsted
> > So, you think I should go to postfix increments instead of prefix? > I'm a beginner in C++, so I'm not comfortable on which of them to chose. > ​I was just giving some tips in case you needed to look at the output from Valgrind. When using the prefix, Valgrinds messages didn't lead me right to

Re: [Rcpp-devel] R session crashes when largely using a Rcpp sourced function

2014-10-08 Thread Dirk Eddelbuettel
On 8 October 2014 at 00:07, Jonathan Olmsted wrote: | Have you used a tool like Valgrind? There is a bit of a learning curve, but it | is exceedingly useful. Excellent point. And the "Writing R Extensions" manual has a few tips. Reading the output of valgrind takes a little getting used to thou

Re: [Rcpp-devel] R session crashes when largely using a Rcpp sourced function

2014-10-08 Thread Pierre . Gloaguen
Hello Jonhatan and Dirk, It seems that the whole issue that I encountered was contained in this "off by 1" in the loop. I feel a bit stupid for that :). I can now compute the operation 10^8 times (embedded in another function) without any problem so far, and without using R function gc(). Jus