Reading the comment above the function copy_file_contents() it says the following.
/*
* Once a static file is identified to be served, this function is used to read the file
* and write it over the client socket using Linux's sendfile() system call. This saves us
* the hassle of transferring file buffers from kernel to user space and back.
* */
But the function itself loads the entire file at once into userspace memory.
The function does not use sendfile().
Reading the comment above the function
copy_file_contents()it says the following.But the function itself loads the entire file at once into userspace memory.
The function does not use
sendfile().