MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / mi_option_set

Function mi_option_set

system/lib/mimalloc/src/options.c:297–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295}
296
297void mi_option_set(mi_option_t option, long value) {
298 mi_assert(option >= 0 && option < _mi_option_last);
299 if (option < 0 || option >= _mi_option_last) return;
300 mi_option_desc_t* desc = &mi_options[option];
301 mi_assert(desc->option == option); // index should match the option
302 desc->value = value;
303 desc->init = MI_OPTION_INITIALIZED;
304 // ensure min/max range; be careful to not recurse.
305 if (desc->option == mi_option_guarded_min && _mi_option_get_fast(mi_option_guarded_max) < value) {
306 mi_option_set(mi_option_guarded_max, value);
307 }
308 else if (desc->option == mi_option_guarded_max && _mi_option_get_fast(mi_option_guarded_min) > value) {
309 mi_option_set(mi_option_guarded_min, value);
310 }
311}
312
313void mi_option_set_default(mi_option_t option, long value) {
314 mi_assert(option >= 0 && option < _mi_option_last);

Callers 2

mi_option_set_enabledFunction · 0.85
mi_option_initFunction · 0.85

Calls 1

_mi_option_get_fastFunction · 0.85

Tested by

no test coverage detected