Flow.write doesn't place any limit on how long the list of vectors can be, but real operating systems do have limits and will fail if given too many.
Also, Eio_posix was allocating the array on the stack, which could fail if it was very large.
This is a partial fix for #633, which prevents it from crashing, but we should still get Buf_write to flush when the list of buffers gets long, for efficiency.
Flow.write
doesn't place any limit on how long the list of vectors can be, but real operating systems do have limits and will fail if given too many.Also, Eio_posix was allocating the array on the stack, which could fail if it was very large.
This is a partial fix for #633, which prevents it from crashing, but we should still get Buf_write to flush when the list of buffers gets long, for efficiency.