Skip to content
Prev 15363 / 63424 Next

R_alloc with more than 2GB (PR#7721)

Dear Prof Ripley,
OK, after looking closer at the code and comments in memory.c and 
Rinternals.h (typedef int R_len_t;) I realized that.
Thanks, that is an excellent idea. It should be fine for my immediate 
needs, and better what I've just been doing with Calloc!

 > Because of the use of Fortran, it is hard to see how to allow internal
 > lengths (in elements, not necessarily bytes) to exceed that value.  We
 > need to return to that, but it is not straightforward and last time we
 > discussed it we agreed to defer it.

 > We can manage a better error message, but I am afraid nothing else in
 > the near future.

In the application that triggered this posting, the memory is for a C 
array of doubles within a user-defined C function, not for anything that 
needs to become an R object, so maybe a suggestion would be to make 
R_alloc go directly to malloc without the detour over allocString or 
allocVector; or something along that line?

  Best regards
   Wolfgang

-------------------------------------
Wolfgang Huber
European Bioinformatics Institute
European Molecular Biology Laboratory
Cambridge CB10 1SD
England
Phone: +44 1223 494642
Fax:   +44 1223 494486
Http:  www.ebi.ac.uk/huber