search for: alternta

Displaying 1 result from an estimated 1 matches for "alternta".

Did you mean: alterna
2009 Jul 20
3
S_alloc or Calloc for return value
...sections 6.1.1 and 6.1.2 of the guide on writing R extensions has left me a bit confused. Under R_alloc, I read "R will reclaim the memory at the end of the call" which seems to suggest the storage won't be made available afterwards, so that's not what I should use. As for the alterntaive, under Calloc, I read "This memory lasts until freed by the user", and it's clear that this is to be done within the C function in question. Summary question: how can I allocate memory withing a C function, making it available to an R function that calls the C function? Thanks....