search for: h5r_allocate

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

2011 Sep 14
2
External pointers and an apparent memory leak
I'm using external pointers and seemingly leaking memory. My determination of a memory leak is that the R process continually creeps up in memory as seen by top while the usage as reported by gc() stays flat. I have isolated the C code: void h5R_allocate_finalizer(SEXP eptr) { Rprintf("Calling the finalizer\n"); void* vector = R_ExternalPtrAddr(eptr); free(vector); R_ClearExternalPtr(eptr); } SEXP h5R_allocate(SEXP size) { int i = INTEGER(size)[0]; char* vector = (char*) malloc(i*sizeof(char)); SEXP e_ptr = R_...