mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 15:09:31 +03:00
Merge branch 'master' into dev
This commit is contained in:
commit
03424a7f22
1 changed files with 12 additions and 1 deletions
|
@ -532,8 +532,19 @@ static void mi_option_init(mi_option_desc_t* desc) {
|
||||||
desc->init = INITIALIZED;
|
desc->init = INITIALIZED;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_mi_warning_message("environment option mimalloc_%s has an invalid value: %s\n", desc->name, buf);
|
/* _mi_warning_message() will itself call mi_option_get() for some options,
|
||||||
|
* so to avoid a possible infinite recursion it's important to mark the option as
|
||||||
|
* "initialized" first */
|
||||||
desc->init = DEFAULTED;
|
desc->init = DEFAULTED;
|
||||||
|
if (desc->option == mi_option_verbose) {
|
||||||
|
/* Special case: if the 'mimalloc_verbose' env var has a bogus value we'd never know
|
||||||
|
* (since the value default to 'off') - so in that one case briefly set the option to 'on' */
|
||||||
|
desc->value = 1;
|
||||||
|
}
|
||||||
|
_mi_warning_message("environment option mimalloc_%s has an invalid value: %s\n", desc->name, buf);
|
||||||
|
if (desc->option == mi_option_verbose) {
|
||||||
|
desc->value = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mi_assert_internal(desc->init != UNINIT);
|
mi_assert_internal(desc->init != UNINIT);
|
||||||
|
|
Loading…
Add table
Reference in a new issue