search for: r_size_t

Displaying 16 results from an estimated 16 matches for "r_size_t".

2015 Jan 18
2
default min-v/nsize parameters
...221 #define R_VSIZE 6291456L 222 #endif https://github.com/wch/r-source/blob/master/src/main/startup.c#L169 (ripley last authored on Jun 9, 2004) 157 Rp->vsize = R_VSIZE; 158 Rp->nsize = R_NSIZE; 166 #define Max_Nsize 50000000 /* about 1.4Gb 32-bit, 2.8Gb 64-bit */ 167 #define Max_Vsize R_SIZE_T_MAX /* unlimited */ 169 #define Min_Nsize 220000 170 #define Min_Vsize (1*Mega) https://github.com/wch/r-source/blob/master/src/main/memory.c#L335 (luke last authored on Nov 1, 2000) #ifdef SMALL_MEMORY 336 /* On machines with only 32M of memory (or on a classic Mac OS port) 337 it might b...
2015 Jan 20
1
default min-v/nsize parameters
...h/r-source/blob/master/src/main/startup.c#L169 >> (ripley last authored on Jun 9, 2004) >> 157 Rp->vsize = R_VSIZE; >> 158 Rp->nsize = R_NSIZE; >> 166 #define Max_Nsize 50000000 /* about 1.4Gb 32-bit, 2.8Gb 64-bit */ >> 167 #define Max_Vsize R_SIZE_T_MAX /* unlimited */ >> 169 #define Min_Nsize 220000 >> 170 #define Min_Vsize (1*Mega) >> >> https://github.com/wch/r-source/blob/master/src/main/memory.c#L335 >> (luke last authored on Nov 1, 2000) >> #ifdef SMALL_MEMORY >> 33...
2015 Jan 19
0
default min-v/nsize parameters
...#endif > > https://github.com/wch/r-source/blob/master/src/main/startup.c#L169 > (ripley last authored on Jun 9, 2004) > 157 Rp->vsize = R_VSIZE; > 158 Rp->nsize = R_NSIZE; > 166 #define Max_Nsize 50000000 /* about 1.4Gb 32-bit, 2.8Gb 64-bit */ > 167 #define Max_Vsize R_SIZE_T_MAX /* unlimited */ > 169 #define Min_Nsize 220000 > 170 #define Min_Vsize (1*Mega) > > https://github.com/wch/r-source/blob/master/src/main/memory.c#L335 > (luke last authored on Nov 1, 2000) > #ifdef SMALL_MEMORY > 336 /* On machines with only 32M of memory (or on a classi...
2009 Nov 18
2
Unnecesary code?
Dear R-ers, While browsing the R sources, I found the following piece of code in src\main\memory.c: static void reset_pp_stack(void *data) { R_size_t *poldpps = data; R_PPStackSize = *poldpps; } To me, it looks like the poldpps pointer is a nuissance; can't you just cast the data pointer and derefer it at once? Say, static void reset_pp_stack(void *data) { R_PPStackSize = * (R_size_t *) data; } -- Hun
2015 Jan 15
2
default min-v/nsize parameters
Just wanted to start a discussion on whether R could ship with more appropriate GC parameters. Right now, loading the recommended package Matrix leads to: > library(Matrix) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 1076796 57.6 1368491 73.1 1198505 64.1 Vcells 1671329 12.8 2685683 20.5 1932418 14.8 Results may vary, but here R needed 64MB of N cells and 15MB
2018 Oct 01
1
unexpected memory.limit on windows in embedded R
...emory.limit doesn't mention a default 2GB limit, especially not on win64; - man page of memory.limit and rw-FAQ Q2.9 say that you can set the limit via --max-mem-size or R_MAX_MEM_SIZE env var: both work only in standalone R (Rf_initEmbeddedR ignores them); - R\src\gnuwin32\system.c defines R_size_t R_max_memory = INT_MAX; which is the reason of the 2GB default limit on embedded R; however INT_MAX is not the maximum integer value of an R_size_t variable either on win32 nor on win64; - line 879 of the same system.c source says: "/* set defaults for R_max_memory. This is set here so that...
2011 Aug 14
0
Improved version of Rprofmem
...UNCALL, PREC_FN, 0}}, Index: src/main/memory.c =================================================================== --- src/main/memory.c (revision 35) +++ src/main/memory.c (working copy) @@ -220,10 +220,17 @@ # define FORCE_GC 0 #endif -#ifdef R_MEMORY_PROFILING -static void R_ReportAllocation(R_size_t); +/* Declarations relating to Rprofmem */ + +static int R_IsMemReporting; +static int R_MemReportingToTerminal; +static int R_MemPagesReporting; +static int R_MemDetailsReporting; +static FILE *R_MemReportingOutfile; +static R_size_t R_MemReportingThreshold; +static R_len_t R_MemReportingNElem; +s...
2010 Jul 09
2
Suggestion for serialization performance improvement on Windows
...aw vector on Windows is an issue that has appeared in this list before. It appears to be due to the frequent use of realloc from the resize_buffer method in serialize.c. I suggest a more granular, but still incremental, re-allocation of memory. For example change near the top of resize_buffer to: R_size_t newsize = needed + 65536 - (needed % 65536); or some other similar small multiple of a typical system page size. I have found this to dramatically improve performance of serialization to raw vectors on Windows. Best, Bryan
2011 Oct 05
1
Moderating consequences of garbage collection when in C
...har* R_alloc(size_t, int); char* S_alloc(long, int); Index: src/main/memory.c =================================================================== --- src/main/memory.c (revision 57169) +++ src/main/memory.c (working copy) @@ -2503,6 +2503,17 @@ R_gc_internal(0); } +void R_gc_needed(R_size_t size_needed) +{ + if (FORCE_GC || NO_FREE_NODES() || VHEAP_FREE() < size_needed) { + R_gc_internal(size_needed); + if (NO_FREE_NODES()) + mem_err_cons(); + if (VHEAP_FREE() < size_needed) + mem_err_heap(0); + } +} + static void R_gc_full(R_size_t...
2005 Mar 10
1
R_alloc with more than 2GB (PR#7721)
...mI = (double*) R_alloc(vs, sizeof(double)); I suspect this caused by allocString(int), which is called by R_alloc, see below. Would it be possible to have allocString take a long argument as well? These code excerpts are from R-devel_2005-03-10.tar.gz: char *R_alloc(long nelem, int eltsize) { R_size_t size = nelem * eltsize; SEXP s = allocString(size); ... } SEXP allocString(int length) { return allocVector(CHARSXP, length); } SEXP allocVector(SEXPTYPE type, R_len_t length) { ... case CHARSXP: size = BYTE2VEC(length + 1); ... malloc(sizeof(SEXPREC_ALIGN) + size * sizeof(VECRE...
2019 Jul 13
2
Mitigating Stalls Caused by Call Deparse on Error
...============================================ --- src/include/Defn.h?? ?(revision 76827) +++ src/include/Defn.h?? ?(working copy) @@ -1296,6 +1296,7 @@ ?void NORET ErrorMessage(SEXP, int, ...); ?void WarningMessage(SEXP, R_WARNING, ...); ?SEXP R_GetTraceback(int); +SEXP R_GetTracebackParsed(int); ? ?R_size_t R_GetMaxVSize(void); ?void R_SetMaxVSize(R_size_t); Index: src/library/base/R/traceback.R =================================================================== --- src/library/base/R/traceback.R?? ?(revision 76827) +++ src/library/base/R/traceback.R?? ?(working copy) @@ -16,9 +16,19 @@ ?#? A copy of...
2019 Jul 14
2
[External] Mitigating Stalls Caused by Call Deparse on Error
...> --- src/include/Defn.h?? ?(revision 76827) > +++ src/include/Defn.h?? ?(working copy) > @@ -1296,6 +1296,7 @@ > ?void NORET ErrorMessage(SEXP, int, ...); > ?void WarningMessage(SEXP, R_WARNING, ...); > ?SEXP R_GetTraceback(int); > +SEXP R_GetTracebackParsed(int); > ? > ?R_size_t R_GetMaxVSize(void); > ?void R_SetMaxVSize(R_size_t); > Index: src/library/base/R/traceback.R > =================================================================== > --- src/library/base/R/traceback.R?? ?(revision 76827) > +++ src/library/base/R/traceback.R?? ?(working copy) > @@...
2019 Jul 16
1
[External] Mitigating Stalls Caused by Call Deparse on Error
...src/include/Defn.h (working copy) >>> @@ -1296,6 +1296,7 @@ >>> void NORET ErrorMessage(SEXP, int, ...); >>> void WarningMessage(SEXP, R_WARNING, ...); >>> SEXP R_GetTraceback(int); >>> +SEXP R_GetTracebackParsed(int); >>> >>> R_size_t R_GetMaxVSize(void); >>> void R_SetMaxVSize(R_size_t); >>> Index: src/library/base/R/traceback.R >>> =================================================================== >>> --- src/library/base/R/traceback.R (revision 76827) >>> +++ src/library/base/...
2019 Jul 14
0
[External] Mitigating Stalls Caused by Call Deparse on Error
...> --- src/include/Defn.h?? ?(revision 76827) > +++ src/include/Defn.h?? ?(working copy) > @@ -1296,6 +1296,7 @@ > ?void NORET ErrorMessage(SEXP, int, ...); > ?void WarningMessage(SEXP, R_WARNING, ...); > ?SEXP R_GetTraceback(int); > +SEXP R_GetTracebackParsed(int); > ? > ?R_size_t R_GetMaxVSize(void); > ?void R_SetMaxVSize(R_size_t); > Index: src/library/base/R/traceback.R > =================================================================== > --- src/library/base/R/traceback.R?? ?(revision 76827) > +++ src/library/base/R/traceback.R?? ?(working copy) > @@...
2016 Jun 04
1
RProfmem output format
.../3d5eb2a09f2d75893efdc8bbf1c72d17603886a0), it appears that this was there from the very first commit. Also, searching the code for usages of R_OutputStackTrace(), I only find R_ReportAllocation() and R_ReportNewPage(), both part of of src/main/memory.c (see below). static void R_ReportAllocation(R_size_t size) { if (R_IsMemReporting) { if(size > R_MemReportingThreshold) { fprintf(R_MemReportingOutfile, "%lu :", (unsigned long) size); R_OutputStackTrace(R_MemReportingOutfile); } } return; } static void R_ReportNewPage(void) { if (R_IsMemReporting) { fprintf(R_MemR...
2019 Jul 15
0
[External] Mitigating Stalls Caused by Call Deparse on Error
...revision 76827) >> +++ src/include/Defn.h?? ?(working copy) >> @@ -1296,6 +1296,7 @@ >> ?void NORET ErrorMessage(SEXP, int, ...); >> ?void WarningMessage(SEXP, R_WARNING, ...); >> ?SEXP R_GetTraceback(int); >> +SEXP R_GetTracebackParsed(int); >> ? >> ?R_size_t R_GetMaxVSize(void); >> ?void R_SetMaxVSize(R_size_t); >> Index: src/library/base/R/traceback.R >> =================================================================== >> --- src/library/base/R/traceback.R?? ?(revision 76827) >> +++ src/library/base/R/traceback.R?? ?(wo...