LLVM 22.0.0git
|
#include "Support/rpmalloc/rpmalloc.h"
Public Attributes | |
void *(* | memory_map )(size_t size, size_t *offset) |
Map memory pages for the given number of bytes. | |
void(* | memory_unmap )(void *address, size_t size, size_t offset, size_t release) |
Unmap the memory pages starting at address and spanning the given number of bytes. | |
void(* | error_callback )(const char *message) |
Called when an assert fails, if asserts are enabled. | |
int(* | map_fail_callback )(size_t size) |
Called when a call to map memory pages fails (out of memory). | |
size_t | page_size |
Size of memory pages. | |
size_t | span_size |
Size of a span of memory blocks. | |
size_t | span_map_count |
Number of spans to map at each request to map new virtual memory blocks. | |
int | enable_huge_pages |
Enable use of large/huge pages. | |
const char * | page_name |
Respectively allocated pages and huge allocated pages names for systems. | |
const char * | huge_page_name |
Definition at line 156 of file rpmalloc.h.
int rpmalloc_config_t::enable_huge_pages |
Enable use of large/huge pages.
If this flag is set to non-zero and page size is
Definition at line 221 of file rpmalloc.h.
Called when an assert fails, if asserts are enabled.
Will use the standard assert()
Definition at line 185 of file rpmalloc.h.
Definition at line 225 of file rpmalloc.h.
int(* rpmalloc_config_t::map_fail_callback) (size_t size) |
Called when a call to map memory pages fails (out of memory).
If this callback is
Definition at line 193 of file rpmalloc.h.
void *(* rpmalloc_config_t::memory_map) (size_t size, size_t *offset) |
Map memory pages for the given number of bytes.
The returned address MUST be
Definition at line 169 of file rpmalloc.h.
void(* rpmalloc_config_t::memory_unmap) (void *address, size_t size, size_t offset, size_t release) |
Unmap the memory pages starting at address and spanning the given number of bytes.
Definition at line 180 of file rpmalloc.h.
Respectively allocated pages and huge allocated pages names for systems.
Definition at line 224 of file rpmalloc.h.
size_t rpmalloc_config_t::page_size |
Size of memory pages.
The page size MUST be a power of two. All memory mapping
Definition at line 199 of file rpmalloc.h.
size_t rpmalloc_config_t::span_map_count |
Number of spans to map at each request to map new virtual memory blocks.
This can
Definition at line 212 of file rpmalloc.h.
size_t rpmalloc_config_t::span_size |
Size of a span of memory blocks.
MUST be a power of two, and in [4096,262144]
Definition at line 204 of file rpmalloc.h.