Displaying 2 results from an estimated 2 matches for "resize_buffer".
2010 Jul 09
2
Suggestion for serialization performance improvement on Windows
Dear R developers,
The slow performance of serializing to a raw 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 d...
2007 Jun 24
1
There was a problem by the use of snow.
problem of the very large memory require by the Sign extension.
--- R-2.5.0.orig/src/main/serialize.c 2007-03-27 01:42:08.000000000 +0900
+++ R-2.5.0/src/main/serialize.c 2007-06-25 00:48:58.000000000 +0900
@@ -1866,7 +1866,7 @@
static void resize_buffer(membuf_t mb, int needed)
{
- int newsize = 2 * needed;
+ size_t newsize = 2 * needed;
mb->buf = realloc(mb->buf, newsize);
if (mb->buf == NULL)
error(_("cannot allocate buffer"));
The time-out of read and write was not set.
51:sendData.SOCKnode <- f...