Skip to content

Calling R_PreserveObject from embedded R

2 messages · Laurent Gautier, Martin Rubi

#
Martin,

I am working with code taking a similar approach (from Python), and
I do not seem to observe what you are experiencing.

When I initialize the embeded R with the "--verbose" flag, and initialize
disposable objects from a loop in Python, R outputs lines such as the
ones below:
11.8 Mbytes of vectors used (40%)
Garbage collection 536 = 307+159+70 (level 0) ...
7.1 Mbytes of cons cells used (38%)
19.4 Mbytes of vectors used (65%)
Garbage collection 537 = 307+160+70 (level 1) ...
7.1 Mbytes of cons cells used (38%)
11.8 Mbytes of vectors used (40%)
I am currently working on Linux.
The first strategy appears is something similar, if I understood it right
(there is a global SEXP object called R_PreciousList in memory.c).
May be try  the "--verbose" flag ?
2 days later