文件缓冲

减少i/o操作次数,通常会使用缓冲区,默认4096字节,文件缓冲的行为分为,全缓冲,行缓冲,无缓冲

  • 全缓冲:默认文件缓冲
  • 行缓冲:pty设备,shell,碰到换行符就进行flush
  • 无缓冲:串口设备

results matching ""

    No results matching ""