Skip to content
Prev 15369 / 63424 Next

R_alloc with more than 2GB (PR#7721)

On Thu, 10 Mar 2005, Wolfgang Huber wrote:

            
R_alloc makes use of garbage collection to avoid the need for explicit
free()ing.  Otherwise you might as well use Calloc.

Given that all memory allocated via the heap is aligned to doubles, there 
seems to me to be little or no loss in using a REALSXP rather than a 
CHARSXP, and certainly negligible loss for large vectors.  That will buy 
us a factor of 8 for the present.

Brian