相关疑难解决方法(0)

管道缓冲区大小是4k还是64k?

我在多个地方读到管道的默认缓冲区大小是4kB(例如,这里),我ulimit -a倾向于确认该语句:

$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 15923
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8 // 8 * 512B = 4kB
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, …
Run Code Online (Sandbox Code Playgroud)

c linux size buffer pipe

47
推荐指数
2
解决办法
5万
查看次数

标签 统计

buffer ×1

c ×1

linux ×1

pipe ×1

size ×1