Skip to content

copy_file_contents() #13

@fullnitrous

Description

@fullnitrous

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().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions