MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / mi_error_default

Function mi_error_default

3rd/mimalloc-2.0.9/src/options.c:422–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420static _Atomic(void*) mi_error_arg; // = NULL
421
422static void mi_error_default(int err) {
423 MI_UNUSED(err);
424#if (MI_DEBUG>0)
425 if (err==EFAULT) {
426 #ifdef _MSC_VER
427 __debugbreak();
428 #endif
429 abort();
430 }
431#endif
432#if (MI_SECURE>0)
433 if (err==EFAULT) { // abort on serious errors in secure mode (corrupted meta-data)
434 abort();
435 }
436#endif
437#if defined(MI_XMALLOC)
438 if (err==ENOMEM || err==EOVERFLOW) { // abort on memory allocation fails in xmalloc mode
439 abort();
440 }
441#endif
442}
443
444void mi_register_error(mi_error_fun* fun, void* arg) {
445 mi_error_handler = fun; // can be NULL

Callers 1

_mi_error_messageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected