libowfat/io/iob_addbuf_munmap.c

12 lines
269 B
C
Raw Normal View History

#include <sys/types.h>
#include <sys/mman.h>
2007-10-17 13:06:56 +00:00
#include "iob_internal.h"
static void cleanup(struct iob_entry* x) {
2007-10-19 10:59:47 +00:00
munmap((char*)x->buf,x->offset+x->n);
}
int iob_addbuf_munmap(io_batch* b,const void* buf,uint64 n) {
return iob_addbuf_internal(b,buf,n,cleanup);
2007-10-17 13:06:56 +00:00
}