#include <oskit/io/bufio.h>OSKIT_COMDECL unmap(oskit_bufio_t *io, void *addr, oskit_off_t offset, oskit_size_t amount);
After a successful call to the map method, the client should call this method after it is finished accessing the buffer directly, so that the buffer object can clean up and free any resources that might be associated with the mapping.The addr parameter passed to this method must be exactly the value returned by the map request, and the offset and amount parameters must be exactly the same as the values previously passed in the corresponding map call. In other words, clients must only attempt to unmap whole regions; they must not attempt to unmap only part of a region, or to unmap two previously mapped regions in one call, even if the two regions appear to be contiguous in memory.
- io
- The object whose contents are to be mapped.
- addr
- The address of the mapped region, as returned from the corresponding map call.
- offset
- The offset into the buffer of the mapped region, as passed to the corresponding map call.
- size
- The size of the mapped region, as passed to the corresponding map call.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.