File: buffer_munmap.c

package info (click to toggle)
libowfat 0.30-2
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 4,180 kB
  • ctags: 1,478
  • sloc: ansic: 15,320; makefile: 22
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
}