tmp = mmap((void*)base, size, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0);
if( tmp == MAP_FAILED ) {
printf("ERROR: Unable to allocate memory\n");
perror("AllocateMemory");
return -1;
}
tmp = mmap((void*)base, size, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0);
if( tmp == MAP_FAILED ) {
printf("ERROR: Unable to allocate memory\n");
perror("AllocateMemory");
return -1;
}