In article 
<8ec76080907051259q4744d40bp46b2434b086d5...@mail.gmail.com>,
 Whit Armstrong <armstrong.w...@gmail.com> wrote:

> If you are in control of the c++ library (i.e. it is not from a
> vendor), then you can also override the new operator of your object so
> that it allocates an SEXP.  if you implement PROTECT/UNPROTECT calls
> correctly, then GC will not be a problem.

The library returns addresses which may not be from the top of the 
allocated object. For some pre-calculated values, I actually use a 
shared memory pool.

I really need to be able to 'wire' this address directly into the SEXP.

Like I wrote in another message, changing the GC code (if necessary) 
could be a viable option.

> Sources here:
> R backend storage policy: 
> http://github.com/armstrtw/r.tslib.backend/tree/master
> tslib: http://github.com/armstrtw/tslib/tree/master

I really like this approach, it would turn useful for many other 
projects :).

Thanks

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to