![]() |
![]()
| ![]() |
![]()
NAMEbuffer_mmapread - create read-only memory-mapped file buffer SYNTAX#include <libowfat/buffer.h> int buffer_mmapread(buffer &b,const char* filename); DESCRIPTIONbuffer_mmapread opens filename for reading and fills b so that the contents of the file can be read from it. Using mmap is more efficient than reading through a real buffer, but you have to call buffer_close to unmap the memory in the end. EXAMPLE #include <libowfat/buffer.h>
RETURN VALUEbuffer_mmapread returns 0 if everything was fine, -1 on error (setting errno). SEE ALSObuffer_flush(3), buffer(3)
|