search for: vmaxget

Displaying 19 results from an estimated 19 matches for "vmaxget".

Did you mean: vm_get
2000 Feb 08
1
problem with va_list type (alpha) (PR#421)
...was able to compile. (and R runs now, but I guess only because I didn't came across this code section) --- ./src/main/printutils.c.va_list.patch Mon Feb 7 15:08:14 2000 +++ ./src/main/printutils.c Mon Feb 7 15:52:54 2000 @@ -421,7 +421,7 @@ else { char buf[BUFSIZE], *p = buf, *vmax = vmaxget(); int slen, res; - if(!arg) { + if(&arg!=NULL) { /* just a string, so length is known */ if((slen = strlen(format)) >= BUFSIZE) p = R_alloc(slen+1, sizeof(char)); -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list...
2005 Nov 27
1
segfault on write.dcf with gzfile connection
...things for me, but I've not tested on other platforms. Index: connections.c =================================================================== --- connections.c (revision 36434) +++ connections.c (working copy) @@ -186,8 +186,11 @@ { char buf[BUFSIZE], *b = buf, *vmax = vmaxget(); int res, usedRalloc = FALSE; + va_list aq; - res = vsnprintf(buf, BUFSIZE, format, ap); + va_copy(aq, ap); + res = vsnprintf(buf, BUFSIZE, format, aq); + va_end(aq); if(res >= BUFSIZE) { /* res is the desired output length */ usedRalloc = TRUE; b = R_...
2008 Oct 03
1
Memory crash
...my own package glmmML. Has happened many time before, but this time I get no hint of where in my C functions the error might be. I give the output below. Can this be an R bug? I suspect it has to do with repeated calls to 'vmmin' like this: for (...){ vmax = vmaxget(); vmmin(*p, b, &Fmin, bfun, bfun_gr, *maxit, *trace, mask, abstol, reltol, nREPORT, ext, &fncount, &grcount, &fail); vmaxset(vmax); ... } but I am only guessing. Any suggestions? Ubuntu 8.04, R-2.7.2. G?ran ---------------...
2011 Aug 04
1
slightly speeding up readChar()
...then pass that so that instead of allocating it a new the old pointer is used (?). In any case, here is an updated readFixedString(), which would drop 2 O(N) operations. --- static SEXP readFixedString(Rconnection con, int len, int useBytes) { SEXP ans; char *buf; int m; const void *vmax = vmaxget(); if(utf8locale && !useBytes) { int i, clen; char *p, *q; p = buf = (char *) R_alloc(MB_CUR_MAX*len+1, sizeof(char)); memset(buf, 0, MB_CUR_MAX*len+1); for(i = 0; i < len; i++) { q = p; m = con->read(p, sizeof(char), 1, con); if(!m) { if(i == 0) return R_NilValu...
2009 Mar 03
1
profiler and loops
...ckTop; cptr->evaldepth = R_EvalDepth; cptr->callflag = flags; cptr->call = syscall; cptr->cloenv = env; cptr->sysparent = sysp; cptr->conexit = R_NilValue; cptr->cend = NULL; cptr->promargs = promargs; cptr->callfun = callfun; cptr->vmax = vmaxget(); cptr->intsusp = R_interrupts_suspended; cptr->handlerstack = R_HandlerStack; cptr->restartstack = R_RestartStack; cptr->prstack = R_PendingPromises; #ifdef BYTECODE cptr->nodestack = R_BCNodeStackTop; # ifdef BC_INT_STACK cptr->intstack = R_BCIntStackTop; # en...
2009 Jan 19
1
patch for textspecial and defaultfont in xfig
...* encoding */ @@ -7449,7 +7458,7 @@ pGEDevDesc gdd; char *vmax; const char *file, *paper, *family, *bg, *fg, *encoding; - int horizontal, onefile, pagecentre; + int horizontal, onefile, pagecentre, defaultfont, textspecial; double height, width, ps; vmax = vmaxget(); @@ -7467,6 +7476,8 @@ ps = asReal(CAR(args)); args = CDR(args); onefile = asLogical(CAR(args)); args = CDR(args); pagecentre = asLogical(CAR(args));args = CDR(args); + defaultfont = asLogical(CAR(args)); args = CDR(args); + textspecial = asLogical(CAR(args)); args...
1999 Feb 02
0
Suggestion
...very time I upgrade R. Here is my diff diff -r R-0.63/src/main/dotcode.c R-0.63.orig/src/main/dotcode.c 264,286d263 < SEXP do_dotRCode(SEXP call, SEXP op, SEXP args, SEXP env) < { < DL_FUNC fun; < char buf[128], *p, *q, *vmax; < SEXP retval; < < vmax = vmaxget(); < op = CAR(args); < if (!isString(op)) errorcall(call,"function name must be a string\n"); < < /* make up load symbol & look it up */ < p = CHAR(STRING(op)[0]); < q = buf; while ((*q = *p) != '\0') { p++; q++; } < <...
2000 Mar 03
1
compiling R-1.0.0 on dec alpha (digital Unix 4.0)
...on a dec alpha running digital unix 4.0 and got the following: f77 -shared -o ts.so PPsum.o burg.o eureka.o filter.o pacf.o starma.o stl.o carray.o mburg.o myw.o qr.o -lUfor -lfor -lFutil -lm -lots -lm ld: Warning: Unresolved: R_alloc R_NaReal R_IsNA R_IsNaNorNA R_chk_calloc R_chk_free Rf_error vmaxget vmaxset dqrdc2_ dqrcf_ mkdir ../../../../library/ts/libs gmake[4]: Leaving directory `/home/ming/R-1.0.0/src/library/ts/src' gmake[3]: Leaving directory `/home/ming/R-1.0.0/src/library/ts' gmake[3]: Entering directory `/home/ming/R-1.0.0/src/library/profile' building system startup prof...
2006 Mar 31
2
R garbage collection
r-help, The R manual lists two types of memory: transient and user-controlled. If I have transient blocks reachable from the globals only by traversal through user-controlled blocks, will they be correctly preserved? Secondly, what are the ways to mark user controlled blocks as "roots" for the garbage collector, so that transient blocks they reference stay uncollected? So far I
2006 Mar 31
2
R garbage collection
r-help, The R manual lists two types of memory: transient and user-controlled. If I have transient blocks reachable from the globals only by traversal through user-controlled blocks, will they be correctly preserved? Secondly, what are the ways to mark user controlled blocks as "roots" for the garbage collector, so that transient blocks they reference stay uncollected? So far I
2017 Oct 18
1
uniform sampling without replacement algorithm
...blsize) tblsize <<= 1; unsigned tblmask = tblsize - 1; /* Allocate hash table, as auto variable if small, else with R_alloc. */ struct tblentry { int pos, val; } *tbl; struct tblentry local [ tblsize < 1000 ? tblsize : 1 ]; void *vmax = VMAXGET(); tbl = tblsize < 1000 ? local : (struct tblentry *) R_alloc(tblsize,sizeof *tbl); /* Clear all entries to zero. Non-empty pos values start at 1. */ memset (tbl, 0, tblsize * sizeof *tbl); /* Allocate vector to hold result. */...
2000 Jan 17
1
lwd patches for "contour"
...if (nx < 2 || ny < 2) errorcall(call, "insufficient x or y values"); *************** *** 507,512 **** --- 509,515 ---- ltysave = dd->gp.lty; colsave = dd->gp.col; + lwdsave = dd->gp.lwd; GMode(1, dd); for (i = 0; i < nc; i++) { vmax = vmaxget(); *************** *** 516,521 **** --- 519,527 ---- dd->gp.col = INTEGER(col)[i % ncol]; if (dd->gp.col == NA_INTEGER) dd->gp.col = colsave; + dd->gp.lwd = REAL(lwd)[i % nlwd]; + if (dd->gp.lwd == NA_REAL) + dd->gp.lwd = lwdsave; contour(x, nx, y, ny, z, RE...
2004 Mar 13
0
64bit build on IBM
...1-317 ERROR: Undefined symbol: .Rf_begincontext ld: 0711-317 ERROR: Undefined symbol: .Rf_endcontext ld: 0711-317 ERROR: Undefined symbol: .Rf_setAttrib ld: 0711-317 ERROR: Undefined symbol: .Rf_unprotect ld: 0711-317 ERROR: Undefined symbol: .R_setX11Routines ld: 0711-317 ERROR: Undefined symbol: .vmaxget ld: 0711-317 ERROR: Undefined symbol: .Rf_asReal ld: 0711-317 ERROR: Undefined symbol: .Rf_isValidString ld: 0711-317 ERROR: Undefined symbol: .Rf_warningcall ld: 0711-317 ERROR: Undefined symbol: .Rf_isString ld: 0711-317 ERROR: Undefined symbol: .Rf_isInteger ld: 0711-317 ERROR: Undefined symbol:...
2001 Nov 15
3
pdf() behavior (PR#1174)
--0__=88256B050063F04C8f9e8a93df938690918c88256B050063F04C Content-type: text/plain; charset=us-ascii The attached script produces "Error in plot.xy ... negative length vectors are not allowed" when using pdf() but not when using postscript (). platform sparc-sun-solaris2.8 arch sparc os solaris2.8 system sparc, solaris2.8 status major 1 minor 3.1 year 2001 month
2011 Apr 21
0
C source code question (Robustbase edition)
...return r; } /* qn */ /* pull(): auxiliary routine for Qn and Sn * ====== ======== --------------------- */ double pull(double *a_in, int n, int k) { /* Finds the k-th order statistic of an array a[] of length n * -------------------- */ int j; double *a, ax; char* vmax = vmaxget(); a = (double *)R_alloc(n, sizeof(double)); /* Copy a[] and use copy since it will be re-shuffled: */ for (j = 0; j &lt; n; j++) a[j] = a_in[j]; k--; /* 0-indexing */ rPsort(a, n, k); ax = a[k]; vmaxset(vmax); return ax; } /* pull */ /* Local variables secti...
2005 Aug 22
2
RFC: "loop connections"
...his->lastline); free(this); } @@ -1765,7 +1802,7 @@ static int text_vfprintf(Rconnection con, const char *format, va_list ap) { - Routtextconn this = (Routtextconn)con->private; + Routloopconn this = (Routloopconn)con->private; char buf[BUFSIZE], *b = buf, *p, *q, *vmax = vmaxget(); int res = 0, usedRalloc = FALSE, buffree, already = strlen(this->lastline); @@ -1830,24 +1867,41 @@ return res; } -static void outtext_init(Rconnection con, char *mode, int idx) +static size_t raw_write(const void *ptr, size_t size, size_t nitems, + Rconnection con) +{ + R...
2005 Sep 18
0
Updated rawConnection() patch
...= lengthgets(tmp, len + need + (len>>3) + 16); + R_PreserveObject(this->data); + R_ReleaseObject(tmp); + } +} + #define LAST_LINE_LEN 256 static int text_vfprintf(Rconnection con, const char *format, va_list ap) @@ -1803,7 +1841,6 @@ char buf[BUFSIZE], *b = buf, *p, *q, *vmax = vmaxget(); int res = 0, usedRalloc = FALSE, buffree, already = strlen(this->lastline); - SEXP tmp; if(already >= BUFSIZE) { /* This will fail so just call vsnprintf to get the length of @@ -1841,13 +1878,9 @@ for(p = b; ; p = q+1) { q = Rf_strchr(p, '\n'); if(q) {...
2010 Sep 08
0
Correction to vec-subset speed patch
...ipts to list assign")); PROTECT(sub = GetOneIndex(sub, ind)); - PROTECT(indx = makeSubscript(x, sub, &stretch, R_NilValue)); + PROTECT(indx = makeSubscript(x, sub, &stretch, R_NilValue, 1)); n = length(indx); if (n > 1) @@ -1243,7 +1243,7 @@ vmax = vmaxget(); nx = length(x); PROTECT(s = GetOneIndex(s, ind)); - PROTECT(s = makeSubscript(x, s, &stretch, R_NilValue)); + PROTECT(s = makeSubscript(x, s, &stretch, R_NilValue, 1)); ns = length(s); indx = (int*)R_alloc(nx, sizeof(int)); for (i = 0; i < nx; i++) Index...
2002 Jul 11
1
dyn.load tcl/tk (PR#1774)
...Rf_allocString Rf_allocVector Rf_allocList Rf_asInteger Rf_duplicate Rf_GetOption Rf_install Rf_isList Rf_isVector Rf_length Rf_listAppend Rf_nthcdr Rf_PrintDefaults Rf_protect Rf_unprotect SET_STRING_ELT SET_TAG SETCAR SETCDR Rf_begincontext Rf_endcontext Rf_str2type Rf_errorcall Rf_EncodeElement vmaxget vmaxset R_alloc Rprintf Rf_elt Rf_findVar Rf_GetDevice devNumber GEplayDisplayList addInputHandler getInputHandler removeInputHandler R_InputHandlers Rf_KillDevice R_setX11Routines gmake[5]: Entering directory `/soft/R/R-1.5.1/src/modules/X11' mkdir -p -- /soft/R/R-1.5.1/modules gmake[5]: Leavi...