[R] Formal definitions of R-language.

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Thu Jul 17 16:20:50 CEST 2003


Murad Nayal <mn216 at columbia.edu> writes:

[Sensible stuff, except:]
> > what sort of garbage collector it uses?
> 
> No garbage collector. uses reference counting to discard objects that
> are no longer needed.

No, R uses garbage collection with a "generational" scheme which looks
more frequently at younger objects. The vector heap is handled with
standard malloc-style memory allocation techniques (we once had code
that would compact the heap during garbage collection, but it was
found to be logically inconsistent: if you called a C routine and it
called back into R and triggered a GC, it could happen that the C
pointers were no longer pointing to the vectors they originally did).

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list