Does Zero-copy exist in Windows OS?

若如初见. 提交于 2019-12-08 15:59:05

问题


Reading this zero copy article,

Does Zero-copy exist in Windows OS (server 2003, 2008, 2008 R2) ?


回答1:


Yes, it is supported via the TransmitFile API.

I'm pretty sure that IIS uses this as well.

Whether or not this method does real zero-copy (i.e. doesn't even copy from the file buffers to the socket buffers) is not explicitly mentioned in the documentation. But given the fact that this method is defined in a way that definitely makes it possible, I'd be highly surprised if this were not the case.

The closest the documentation comes to stating it clearly is this paragraph:

[...] TransmitFile achieves its performance gains by sending data directly from the file cache.



来源:https://stackoverflow.com/questions/7089735/does-zero-copy-exist-in-windows-os

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!