File: buffer_munmap.c

package info (click to toggle)
libowfat 0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,288 kB
  • sloc: ansic: 20,181; makefile: 16
file content (15 lines) | stat: -rw-r--r-- 234 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "buffer.h"
#ifdef __MINGW32__
#include <windows.h>
#else
#include <sys/mman.h>
#endif

void buffer_munmap(void* buf) {
  buffer* b=(buffer*)buf;
#ifdef __MINGW32__
  UnmapViewOfFile(b->x);
#else
  munmap(b->x,b->a);
#endif
}