Rhythmic Fistman wrote:
On 2/22/07, Toby Douglass <[EMAIL PROTECTED]> wrote:
Yup. I'll be passing in a struct which contains that overlapped as its
first member. When it comes back to be, I'll cast the overlapped
pointer to my struct type. I think this means though I need a malloc
per write, since I have to create the overlapped structure. That's bad,
since the point of this is high throughput.
I don't think malloc's going to eat that much into your io-bound
code's performance,
but if you're worried about it just reuse the same overlapped structure
instead
of re-mallocing it.
I don't want to have to be in a situation where I have to cache my
allocations - it's extra code to write and debug and it impacts upon the
cleanliness and simplicity of the design.
It's a shame, really - with serial async writes, the only malloc you do
is up front, once, when the socket is handed over to the API.
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users