search for: totalnmuts

Displaying 1 result from an estimated 1 matches for "totalnmuts".

2003 Dec 05
3
.C() memory allocation
...ment sequences = integer(0) in the call to .C(), then declaring the corresponding argument as int *sequences in my C code. I tried R_alloc()ing the storage in C and assigning the pointer to sequences but that segfaulted. Then I tried Realloc()ing sequences: sequences = Realloc(sequences, *nsam * *totalnmuts, int) ; But that also segfaults. Thanks very much for replies and R in general. Dan btw I think this is misleading / a typo in section 5.1.2 p.58 ch5 of "Writing R Extensions", I hope I haven't just misunderstood. It reads: The interface functions are type* Calloc(size_t n, ty...