Displaying 1 result from an estimated 1 matches for "r_gc_needed".
2011 Oct 05
1
Moderating consequences of garbage collection when in C
...haracters each; a simplified illustration understating the effects
(because there is initially little to garbage collect, in contrast to an
R session with several packages loaded) is below.
A simple solution is to provide a mechanism for the C programmer to
request sufficient memory in advance. R_gc_needed might also be re-used
at two other locations in memory.c (2221 and 2361) and could be exposed
at the R level via a new argument, with default 0, to gc().
%> time R --vanilla -e "dyn.load('gc.so'); x = .Call('doit', 1000000,
FALSE)"
> dyn.load('gc.so');...