Displaying 5 results from an estimated 5 matches for "closememoutpstream".
2015 Mar 17
2
Reduce memory peak when serializing to raw vectors
...817272 kB
We work with very large data frames and in many cases this is killing R with an "out of memory" error.
This is the relevant code in R 3.1.3 in src/main/serialize.c:2494
InitMemOutPStream(&out, &mbs, type, version, hook, fun);
R_Serialize(object, &out);
val = CloseMemOutPStream(&out);
The serialized object is being stored in a buffer pointed by out.data. Then in CloseMemOutPStream() R copies the whole buffer to a newly allocated SEXP object (the raw vector that stores the final result):
PROTECT(val = allocVector(RAWSXP, mb->count));
memcpy(RAW(val), mb->buf,...
2015 Mar 17
2
Reduce memory peak when serializing to raw vectors
...ling R
> with an "out of memory" error.
> >
> > This is the relevant code in R 3.1.3 in src/main/serialize.c:2494
> >
> > InitMemOutPStream(&out, &mbs, type, version, hook, fun);
> > R_Serialize(object, &out);
> > val = CloseMemOutPStream(&out);
> >
> > The serialized object is being stored in a buffer pointed by out.data.
> Then in CloseMemOutPStream() R copies the whole buffer to a newly allocated
> SEXP object (the raw vector that stores the final result):
> >
> > PROTECT(val = allocVector(...
2015 Mar 17
0
Reduce memory peak when serializing to raw vectors
...large data frames and in many cases this is killing R with an "out of memory" error.
>
> This is the relevant code in R 3.1.3 in src/main/serialize.c:2494
>
> InitMemOutPStream(&out, &mbs, type, version, hook, fun);
> R_Serialize(object, &out);
> val = CloseMemOutPStream(&out);
>
> The serialized object is being stored in a buffer pointed by out.data. Then in CloseMemOutPStream() R copies the whole buffer to a newly allocated SEXP object (the raw vector that stores the final result):
>
> PROTECT(val = allocVector(RAWSXP, mb->count));
> mem...
2015 Mar 17
0
Reduce memory peak when serializing to raw vectors
...817272 kB
We work with very large data frames and in many cases this is killing R with an "out of memory" error.
This is the relevant code in R 3.1.3 in src/main/serialize.c:2494
InitMemOutPStream(&out, &mbs, type, version, hook, fun);
R_Serialize(object, &out);
val = CloseMemOutPStream(&out);
The serialized object is being stored in a buffer pointed by out.data. Then in CloseMemOutPStream() R copies the whole buffer to a newly allocated SEXP object (the raw vector that stores the final result):
PROTECT(val = allocVector(RAWSXP, mb->count));
memcpy(RAW(val), mb->buf,...
2015 Mar 17
0
Reduce memory peak when serializing to raw vectors
...t;out of memory" error.
>> >
>> > This is the relevant code in R 3.1.3 in src/main/serialize.c:2494
>> >
>> > InitMemOutPStream(&out, &mbs, type, version, hook, fun);
>> > R_Serialize(object, &out);
>> > val = CloseMemOutPStream(&out);
>> >
>> > The serialized object is being stored in a buffer pointed by out.data. Then in CloseMemOutPStream() R copies the whole buffer to a newly allocated SEXP object (the raw vector that stores the final result):
>> >
>> > PROTECT(val = allocV...