[Rcpp-devel] Have I noticed memory management bug in RcppArmadillo or is this the intended behaviour?
    Slava Razbash 
    slava.razbash at gmail.com
       
    Fri Oct 28 16:54:45 CEST 2011
    
    
  
Hi Dirk,
> i)  Not reproducible as I don't have 'learningMatrix.h'.
Here is "learningMatrix.h":
#ifndef _mypac_LEARNING_MATRIX_H
#define _mypac_LEARNING_MATRIX_H
 #include <RcppArmadillo.h>
 RcppExport SEXP fastLm(SEXP ys, SEXP Xs) ;
 #endif
Here is "learningMatrix.cpp":
#include "learningMatrix.h"
SEXP fastLm(SEXP ys, SEXP Xs) {
     return R_NilValue;
}
> ii) What is baseline function and how do you measure memory use?
>     Just by looking at top(1) ?
I have been using windows 7 and looking at memory use in the Task Manager.
If have been calling for() { .Call()  }  from terminal prompt, there
were no other functions.
I have not yet had time to try it on a *nix OS.
Thanks,
Slava
On 10/28/11, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 28 October 2011 at 15:14, Slava Razbash wrote:
> | > i)   Without reproducible code, there is very little we can say here.
> | Here is mycode, I have "learningMatrix.h" and "learningMatrix.cpp":
> | ///Header file:
> |
> | #ifndef _mypac_LEARNING_MATRIX_H
> | #define _mypac_LEARNING_MATRIX_H
> |
> | #include <RcppArmadillo.h>
> |
> | RcppExport SEXP fastLm(SEXP ys, SEXP Xs) ;
> |
> | #endif
> |
> |
> | ///Source file:
> |
> | #include "learningMatrix.h"
> |
> | SEXP fastLm(SEXP ys, SEXP Xs) {
> |
> |     return R_NilValue;
> | }
>
> i)  Not reproducible as I don't have 'learningMatrix.h'.
>
> ii) What is baseline function and how do you measure memory use?
>     Just by looking at top(1) ?
>
> | > ii)  See the 'Writing R Extensions' manual and the hints about valgrid,
> if you
> | >     really suspect leakage valgrind normally finds it.
> |
> | I'll take a look at valgrind now.
>
> It is a great tool but not the easiest to use. Output can be a little
> baffling at first, especially with large complex programs like R.
>
> 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