Hello!

This is just copying the *pointers* to the supplied data, not the data
itself.

Cheers,
Fedor.


On Fri, Jul 18, 2014 at 5:55 AM, vegertar hu <[email protected]> wrote:

> The libuv is the latest git master version.
>
> I have tracked the memory of the buffer and will free on send_cb, but in
> the source of uv__udp_send, I found some "copy" fragment:
>
>   req->bufs = req->bufsml;
>
>
>   if (nbufs > ARRAY_SIZE(req->bufsml))
>
>
>     req->bufs = malloc(nbufs * sizeof(bufs[0]));
>
>
>
>
>   if (req->bufs == NULL)
>
>
>     return -ENOMEM;
>
>
>
>   memcpy(req->bufs, bufs, nbufs * sizeof(bufs[0]));
>
>
>   handle->send_queue_size += uv__count_bufs(req->bufs, req->nbufs);
>
>
>   handle->send_queue_count++;
>
>
>   QUEUE_INSERT_TAIL(&handle->write_queue, &req->queue);
>
>
>   uv__handle_start(handle);
>
> It should be zero-copy, shouldn't it ?
>
> I also wonder the same stuff when I calling uv_write.
>
> Thanks for your consideration.
>
>
>
>  --
> 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/d/optout.
>

-- 
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/d/optout.

Reply via email to