search for: num_small_node_classes

Displaying 4 results from an estimated 4 matches for "num_small_node_classes".

2004 Jun 08
5
fast mkChar
Hi, To speed up reading of large (few million lines) CSV files I am writing custom read functions (in C). By timing various approaches I figured out that one of the bottlenecks in reading character fields is the mkChar() function which on each call incurs a lot of garbage-collection-related overhead. I wonder if there is a "vectorized" version of mkChar, say mkChar2(char **, int
2013 Aug 29
2
Why does an empty vector occupy 40 bytes?
Hi all, Why is the object size of an empty vector 40 bytes? (At least in 64-bit R.) object.size(integer(0)) # 40 bytes Reading R internals, it looks like it should be: * 4 bytes: sxpinfo header (= 32 bits) * 8 bytes: pointer to attributes * 8 bytes: pointer to next node * 8 bytes: pointer to previous node * 4 bytes: length * 4 bytes: true length = 36 bytes Where are the extra 4 bytes coming
2010 Jan 07
1
Segfault in GetNewPage, memory.c.
...if (FORCE_GC || NO_FREE_NODES() || VHEAP_FREE() < alloc_size) { > (gdb) > 2017 old_R_VSize = R_VSize; > (gdb) > 2020 if (FORCE_GC || NO_FREE_NODES() || VHEAP_FREE() < alloc_size) { > (gdb) > 2028 if (size > 0) { > (gdb) > 2029 if (node_class < NUM_SMALL_NODE_CLASSES) { > (gdb) > 2030 CLASS_GET_FREE_NODE(node_class, s); > (gdb) > > Program received signal SIGSEGV, Segmentation fault. > GetNewPage (node_class=1) at memory.c:657 > 657 SNAP_NODE(s, base); > (gdb) So CLASS_GET_FREE_NODE is #defined in memory.c as: > #define CL...
2011 Aug 14
0
Improved version of Rprofmem
...tNewPage(); page->next = R_GenHeap[node_class].pages; R_GenHeap[node_class].pages = page; R_GenHeap[node_class].PageCount++; @@ -2312,6 +2317,13 @@ } } + if (R_IsMemReporting) { + if (!R_MemPagesReporting + || size > 0 && node_class >= NUM_SMALL_NODE_CLASSES) + R_ReportAllocation (sizeof(SEXPREC_ALIGN) + size * sizeof(VECREC), + type, length); + } + /* save current R_VSize to roll back adjustment if malloc fails */ old_R_VSize = R_VSize; @@ -2351,9 +2363,6 @@ s = malloc(sizeof(SEXPREC_ALIG...