search for: extptr

Displaying 6 results from an estimated 6 matches for "extptr".

2007 Aug 03
2
How to properly finalize external pointers?
...R_ClearExternalPtr call the finalizer and then unregister it? (this would also work when removing the SEXP external pointer object is difficult because it was handed over to the closing function directly as a parameter) Best regards Jens Oehlschl?gel // C-code static void rindex_finalize(SEXP extPtr){ pINT ptr = R_ExternalPtrAddr(extPtr); if(ptr){ Free(ptr); Rprintf("finalized\n"); }else{ Rprintf("nothing to finalize\n"); } return; } SEXP rindex_open( SEXP Sn ){ int i,n = INTEGER(Sn)[0]; pINT ptr = Calloc(sizeof(INT)*n, INT); SEXP extPtr, ret...
2011 May 26
1
serialization of external pointers
Hello, I'm looking for examples of how to handle serialization of external pointers. We use external pointers intensively in Rcpp for modules and one popular request is to have persistence. And I guess we need to be able to serialize/deserialize external pointers for this. Also, module objects are all instances of reference classes, so maybe that can be handled at the R level ? Romain
2008 Jul 14
0
RODBC Seg Fault
Hi Everyone, At the end of this email is a transcript of a problem I have found in RODBC version 2.3-1. It appears that the bug fix in odbcClose for the memory leak has meant that the garbage collector is falling over when it tries to free up the extPtr attribute of the RODBC connection pointer. Any advice on how to fix this? Thanks for your help, Tom ##--------------------------------------------------------------- platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major...
2009 Dec 16
2
What is the fastest way to see what are in an RData file?
Currently, I load the RData file then ls() and str(). But loading the file takes too long if the file is big. Most of the time, I only interested what the variables are in the the file and the attributes of the variables (like if it is a data.frame, matrix, what are the colnames/rownames, etc.) I'm wondering if there is any facility in R to help me avoid loading the whole file.
2012 Nov 29
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
I have a new problem: Register RBP is used in a function foo. (I am not allocating RBP to any virtual register, the instances of RBP in function foo are in the machine code when my register allocator starts.) Function foo calls function bar. Register RBP is not saved across the call, though it is live after the call. Function bar includes a virtual register. The code that I'm using to
2012 Dec 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...l; } void mkentry (register int*, int, int, int, int); void mkprot (int[], int, int); void mktemplate (int[], int, int); void mv2front (int); int tbldiff (int[], int, int[]); void bldtbl( state, statenum, totaltrans, comstate, comfreq ) int state[], statenum, totaltrans, comstate, comfreq; { int extptr, extrct[2][256 + 1]; int mindiff, minprot, i, d; extptr = 0; if ( (totaltrans * 100) < (numecs * 15) ) mkentry( state, numecs, statenum, -32766, totaltrans ); else { int checkcom = comfreq * 100 > totaltrans * 50; minprot = firstprot; mindiff = totaltrans; if ( checkcom )...