Skip to content

R-alpha: unif_rand() again

1 message · Luke Tierney

#
Peter Dalgaard BSA wrote:
This may not be an issue here but it is something to keep in mind for
call_S in S and R:

You need to be careful about making lots of call_S's that return large
amounts of data within a single call to .C. The reason is that the
call_S mechanism provides no way to mark the returned result as no
longer needed, so it cannot be reclaimed. Allocations made in the
process of executing the function called with call_S should be freed
just fine, but the result can't be. So if you produce lots of results,
you will consume lots of memory. For most uses of call_S this isn't an
issue, but if you were doing the loop of a long simulation is C and
it could become an issue.