nm_memalloc_helper.h
Go to the documentation of this file.
44static inline void _memalloc_helper_check_and_exit(const int rc, const char*func, const int line, char*cmt)
98 buffer = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_HUGETLB | MAP_HUGE_2MB, -1, 0);
106 buffer = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_HUGETLB | MAP_HUGE_1GB, -1, 0);
static void * allocate_buffer(size_t size, alloc_type_t alloc_type)
Allocates a buffer with asked allocation method.
Definition nm_memalloc_helper.h:63
static void _memalloc_helper_check_and_exit(const int rc, const char *func, const int line, char *cmt)
Definition nm_memalloc_helper.h:44
static void free_buffer(void *buffer, size_t size, alloc_type_t alloc_type)
Release a buffer allocated with allocate_buffer()
Definition nm_memalloc_helper.h:120
nm_len_t size
size of the onsided data (not incuding target-side completion)
Definition nm_onesided_private.h:1