HOG2
|
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <cinttypes>
Go to the source code of this file.
Macros | |
#define | MAP_ANONYMOUS MAP_ANON |
#define | handle_error(msg) do { perror(msg); exit(EXIT_FAILURE); } while (0) |
Functions | |
uint8_t * | GetMMAP (const char *filename, uint64_t mapSize, int &fd, bool zero) |
void | CloseMMap (uint8_t *mem, uint64_t mapSizeBytes, int fd) |
#define handle_error | ( | msg | ) | do { perror(msg); exit(EXIT_FAILURE); } while (0) |
Definition at line 25 of file MMapUtil.cpp.
#define MAP_ANONYMOUS MAP_ANON |
Definition at line 22 of file MMapUtil.cpp.
void CloseMMap | ( | uint8_t * | mem, |
uint64_t | mapSizeBytes, | ||
int | fd | ||
) |
Definition at line 85 of file MMapUtil.cpp.
References handle_error.
uint8_t* GetMMAP | ( | const char * | filename, |
uint64_t | mapSize, | ||
int & | fd, | ||
bool | zero | ||
) |
Definition at line 28 of file MMapUtil.cpp.
References handle_error, and MAP_ANONYMOUS.