NDN-DPDK
High-Speed Named Data Networking Forwarder
|
#include "mmapfd.h"
#include "logger.h"
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <unistd.h>
Macros | |
#define | MmapFd_Error(func) N_LOGE("%s(%s,fd=%d)" N_LOG_ERROR_ERRNO, #func, filename, m->fd, errno) |
Functions | |
N_LOG_INIT (MmapFd) | |
bool | MmapFd_Open (MmapFd *m, const char *filename, size_t size) |
Create a file with memory map. More... | |
bool | MmapFd_Close (MmapFd *m, const char *filename, size_t size) |
Close a file with memory map. More... | |
#define MmapFd_Error | ( | func | ) | N_LOGE("%s(%s,fd=%d)" N_LOG_ERROR_ERRNO, #func, filename, m->fd, errno) |
bool MmapFd_Close | ( | MmapFd * | m, |
const char * | filename, | ||
size_t | size | ||
) |
Close a file with memory map.
size | truncate to final file size. |
bool MmapFd_Open | ( | MmapFd * | m, |
const char * | filename, | ||
size_t | size | ||
) |
Create a file with memory map.
size | intended file size. |
N_LOG_INIT | ( | MmapFd | ) |