Bypassing the 64K pipe buffer limit

The 64K limit

On standard 2.6 Linux kernels, the buffer size is 64 kilobytes. Although $ ulimit -a reports a pipe size of 8 blocks, the buffer size is not 4K, because the kernel dynamically allocates maximal 16 "buffer entries" which multiply out to 64K. These limits are hardcoded in

/usr/src/linux/include/linux/pipe_fs_i.h:6 #define PIPE_BUFFERS (16)


Details see: http://home.gna.org/pysfst/tests/pipe-limit.html 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章