On Thu, Nov 21, 2013 at 6:11 AM, Aaron Boxer <[email protected]> wrote: > >> > is it possible to use a fixed buffer for reads, instead of alloc being >> > called for each read? >> > >> > So, say I specify a 65532 byte buffer, can I tell libuv to use this >> > buffer >> > repeatedly, and if there is more data than can fit, to just call the >> > callback again? >> >> >> That works on Unices (though it's best considered an implementation >> detail) and will usually work on Windows. uv-win uses native >> completion-based I/O, which means it's possible for allocation >> lifetimes to overlap. > > > Ben, I just wanted to clarify this a bit more. Currently, I have a single > buffer > for each client connection, and all reads for that connection use this > buffer. > Is this safe on windows?
Bert is most qualified to comment on that but I believe the short answer is "no, it's not." > Also, what is the garbage collector that you mention below? V8 has a run-time garbage collector that node.js piggybacks on for some things. It's not a property of libuv. -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/libuv. For more options, visit https://groups.google.com/groups/opt_out.
