search for: test_mem_alloc_v6

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

2009 Dec 21
2
Limit on number of times Realloc can be called?
...double); t[i] = i; } PROTECT(end_product = allocVector(REALSXP,6)); for(i = 0; i < 20; i++) { REAL(end_product)[i] = t[i]; } UNPROTECT(1); Free(t); return end_product; } I call it from R using the following script: z <- 1 test_mem_alloc <- function(z) { if(!(is.loaded("test_mem_alloc_v6"))) dyn.load("test_mem_alloc_v6.dll") out <- .Call("test_mem_alloc", as.double(z)) return(out) dyn.unload("test_mem_alloc_v6.dll") } Basically I get the following error messages: First: "Runtime Error! Program: C:\Program Files\R\R-2.10.0\bin\R...