Skip to content
Prev 3421 / 21312 Next

[Bioc-devel] [BioC] Rsubread crashes in 32bit linux

On 06/06/2012 06:04 AM, Robert Castelo wrote:
R_alloc allocates 'transient' memory, which means that it is 
automatically freed by R when the C routine returns to R. This isn't 
necessarily a drop-in replacement for malloc, for instance you would NOT 
Free() memory allocated with R_alloc and it would not be a good choice 
if your C code were making many memory allocations (both for efficiency 
reasons and because you would likely be explicitly free'ing the memory 
as part of the overall memory management strategy).

Using Calloc / Free is definitely appropriate, and Calloc is a 
not-too-expensive replacement for malloc.

Martin