11#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
12#define MAP_ANONYMOUS MAP_ANON
25 addr = mmap(0,
size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
28 addr = mmap(0,
size, PROT_READ|PROT_WRITE, MAP_PRIVATE, -1, 0);
33 fd =
open(
"/dev/zero", O_RDWR);
36 addr = mmap(0,
size, PROT_READ|PROT_WRITE, MAP_PRIVATE,
fd, 0);
39 if (addr == (
void*) -1)
return NULL;
45 return munmap(addr,
size);
static int omVfreeMmap(void *addr, size_t size)
static void * omVallocMmap(size_t size)
int status int void size_t count int const void size_t count open