Re: [R] Memory allocation using .C interface

2014-04-10 Thread Cassiano dos Santos
Ok, that is why i have suspected. Thanks for the clear explanation. []s Cassiano 2014-04-09 18:37 GMT-03:00 Peter Langfelder peter.langfel...@gmail.com: On Wed, Apr 9, 2014 at 11:27 AM, Cassiano dos Santos crn...@gmail.com wrote: I am testing a call to a C function from R, using .C

[R] Memory allocation using .C interface

2014-04-09 Thread Cassiano dos Santos
I am testing a call to a C function from R, using .C interface. The test consists in passing a numeric vector to the C function with no entries, dynamically allocates n positions, makes attributions and return the vector to R. I'm using Calloc from R.h. The prototype of the function is type*

Re: [R] Memory allocation using .C interface

2014-04-09 Thread Peter Langfelder
On Wed, Apr 9, 2014 at 11:27 AM, Cassiano dos Santos crn...@gmail.com wrote: I am testing a call to a C function from R, using .C interface. The test consists in passing a numeric vector to the C function with no entries, dynamically allocates n positions, makes attributions and return the

Re: [R] Memory allocation using .C interface

2014-04-09 Thread Dirk Eddelbuettel
Cassiano dos Santos crns13 at gmail.com writes: I am testing a call to a C function from R, using .C interface. The test consists in passing a numeric vector to the C function with no entries, dynamically allocates n positions, makes attributions and return the vector to R. Asking on