Mstdlib-1.24.0
|
Functions | |
M_io_error_t | M_io_add_buffer (M_io_t *io, size_t *layer_id, size_t max_read_buffer, size_t max_write_buffer) |
Intermediate layer for buffering reads/writes from the OS.
Allows data to be buffered, this can reduce the number of syscalls required to the OS and increase performance at the cost of memory.
M_io_error_t M_io_add_buffer | ( | M_io_t * | io, |
size_t * | layer_id, | ||
size_t | max_read_buffer, | ||
size_t | max_write_buffer | ||
) |
Add a buffer layer. Cannot be combined with base IO objects which utilize M_io_meta_t.
[in] | io | io object. |
[out] | layer_id | Layer id this is added at. |
[in] | max_read_buffer | Maximum read buffer size in bytes. If not a power of 2 will be rounded up to the next power of 2. Use 0 to disable read buffering. |
[in] | max_write_buffer | Maximum write buffer size in bytes. If not a power of 2 will be rounded up to the next power of 2. Use 0 to disable write buffering. |