[Rd] transient memory allocation and external pointers
Seth Falcon
seth at userprimary.net
Tue Apr 20 18:02:23 CEST 2010
On 4/20/10 6:24 AM, Melissa Jane Hubisz wrote:
> Thanks for the responses. Seth's example is indeed what I was trying
> (hoping) to do, it seems to work on my system fine (ubuntu x86_64, R
> 2.10.1). But if it doesn't work for him, then that definitely answers
> my question. I guess I'll have to go the Calloc/Free route.
I expect that you could get your approach to not work on your system as
well, you just have to try harder ;-)
Memory related bugs can be quite tricky, because incorrect code may run
fine most of the time. To trigger a problem, you need to have the right
pattern of allocation such that data will be written over the memory
that your invalid external pointer points to.
+ seth
--
Seth Falcon | @sfalcon | http://userprimary.net/
More information about the R-devel
mailing list