LLVM 19.0.0git
Public Attributes | List of all members
rpmalloc_config_t Struct Reference

#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 charpage_name
 Respectively allocated pages and huge allocated pages names for systems.
 
const charhuge_page_name
 

Detailed Description

Definition at line 156 of file rpmalloc.h.

Member Data Documentation

◆ enable_huge_pages

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.

Referenced by rpmalloc_initialize_config().

◆ error_callback

void(* rpmalloc_config_t::error_callback) (const char *message)

Called when an assert fails, if asserts are enabled.

Will use the standard assert()

Definition at line 185 of file rpmalloc.h.

◆ huge_page_name

const char* rpmalloc_config_t::huge_page_name

Definition at line 225 of file rpmalloc.h.

Referenced by _rpmalloc_set_name().

◆ map_fail_callback

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.

Referenced by _rpmalloc_mmap_os().

◆ memory_map

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.

Referenced by _rpmalloc_mmap(), and rpmalloc_initialize_config().

◆ memory_unmap

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.

Referenced by _rpmalloc_unmap(), and rpmalloc_initialize_config().

◆ page_name

const char* rpmalloc_config_t::page_name

Respectively allocated pages and huge allocated pages names for systems.

Definition at line 224 of file rpmalloc.h.

Referenced by _rpmalloc_set_name().

◆ page_size

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.

Referenced by rpmalloc_initialize_config().

◆ span_map_count

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.

Referenced by rpmalloc_initialize_config().

◆ span_size

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.

Referenced by rpmalloc_initialize_config().


The documentation for this struct was generated from the following file: