In the past I&#x27;ve found that sendfile is not portable. FreeBSD and Mac OS X require the file that is being sent be a regular file[0] while Linux will take any file descriptor[1]. That being said, I can&#x27;t imagine what benefit memmapping would have in the context over the file system page cache.<p>0 - <a href="https:&#x2F;&#x2F;www.freebsd.org&#x2F;cgi&#x2F;man.cgi?query=sendfile&amp;sektion=2" rel="nofollow">https:&#x2F;&#x2F;www.freebsd.org&#x2F;cgi&#x2F;man.cgi?query=sendfile&amp;sektion=2</a><p>1 - <a href="http:&#x2F;&#x2F;linux.die.net&#x2F;man&#x2F;2&#x2F;sendfile" rel="nofollow">http:&#x2F;&#x2F;linux.die.net&#x2F;man&#x2F;2&#x2F;sendfile</a>