mi-malloc: Runtime Options

| mi-malloc 1.6 |

Enumerations | Functions
Runtime Options

Set runtime behavior. More...

## Enumerations
enum | mi_option_t { mi_option_show_errors, mi_option_show_stats, mi_option_verbose, mi_option_eager_commit, mi_option_eager_region_commit, mi_option_large_os_pages, mi_option_reserve_huge_os_pages, mi_option_segment_cache, mi_option_page_reset, mi_option_segment_reset, mi_option_reset_delay, mi_option_use_numa_nodes, mi_option_reset_decommits, mi_option_eager_commit_delay, mi_option_os_tag, _mi_option_last }
| Runtime options. More...

## Functions
bool | mi_option_is_enabled (mi_option_t option)
void | mi_option_enable (mi_option_t option)
void | mi_option_disable (mi_option_t option)
void | mi_option_set_enabled (mi_option_t option, bool enable)
void | mi_option_set_enabled_default (mi_option_t option, bool enable)
long | mi_option_get (mi_option_t option)
void | mi_option_set (mi_option_t option, long value)
void | mi_option_set_default (mi_option_t option, long value)

## Detailed Description

Set runtime behavior.

## Enumeration Type Documentation

## ◆ mi_option_t

enum mi_option_t

Runtime options.

Enumerator
mi_option_show_errors | Print error messages to `stderr`.
mi_option_show_stats | Print statistics to `stderr` when the program is done.
mi_option_verbose | Print verbose messages to `stderr`.
mi_option_eager_commit | Eagerly commit segments (4MiB) (enabled by default).
mi_option_eager_region_commit | Eagerly commit large (256MiB) memory regions (enabled by default, except on Windows)
mi_option_large_os_pages | Use large OS pages (2MiB in size) if possible.
mi_option_reserve_huge_os_pages | The number of huge OS pages (1GiB in size) to reserve at the start of the program.
mi_option_segment_cache | The number of segments per thread to keep cached.
mi_option_page_reset | Reset page memory after mi_option_reset_delay milliseconds when it becomes free.
mi_option_segment_reset | Experimental.
mi_option_reset_delay | Delay in milli-seconds before resetting a page (100ms by default)
mi_option_use_numa_nodes | Pretend there are at most N NUMA nodes.
mi_option_reset_decommits | Experimental.
mi_option_eager_commit_delay | Experimental.
mi_option_os_tag | OS tag to assign to mimalloc'd memory.
_mi_option_last |

## Function Documentation

## ◆ mi_option_disable()

void mi_option_disable | ( | mi_option_t | option | ) |

## ◆ mi_option_enable()

void mi_option_enable | ( | mi_option_t | option | ) |

## ◆ mi_option_get()

long mi_option_get | ( | mi_option_t | option | ) |

## ◆ mi_option_is_enabled()

bool mi_option_is_enabled | ( | mi_option_t | option | ) |

## ◆ mi_option_set()

void mi_option_set | ( | mi_option_t | option,
|  | long | value
| ) |  |

## ◆ mi_option_set_default()

void mi_option_set_default | ( | mi_option_t | option,
|  | long | value
| ) |  |

## ◆ mi_option_set_enabled()

void mi_option_set_enabled | ( | mi_option_t | option,
|  | bool | enable
| ) |  |

## ◆ mi_option_set_enabled_default()

void mi_option_set_enabled_default | ( | mi_option_t | option,
|  | bool | enable
| ) |  |