You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
337 B
C

19 years ago
#include <sys/types.h>
#ifdef _WIN32
19 years ago
#include <windows.h>
#else
#include <unistd.h>
19 years ago
#include <sys/mman.h>
#include "open.h"
#endif
19 years ago
#include "mmap.h"
int mmap_unmap(const char* mapped,size_t maplen) {
#ifdef _WIN32
19 years ago
(void)maplen;
return UnmapViewOfFile(mapped)?0:-1;
#else
return maplen ? munmap((char*)mapped,maplen) : 0;
19 years ago
#endif
}