Hello!
On Sat, May 13, 2017 at 12:02:13PM +0800, Muhui Jiang wrote:
> Thanks for your great answer. you mentioned that sendfile() is to copy
> between kernel space and userland. I am curious, why this whole process
> don't need to malloc any memory? Could you please explain more on the
> detail implementation of the sendfile(). Many Thanks
No, I said that sendfile() avoids copying between kernel space and
userland. The sendfile() system call is to send a file to a
socket. As such, it allows nginx to simply open the file
requested by a client and then call sendfile() to instruct OS to
transfer it to the socket.
--
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx