mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
Add ability to register custom error function called on various error conditions; including ENOMEM
This commit is contained in:
parent
3e982a3813
commit
dc58388968
20 changed files with 342 additions and 127 deletions
|
@ -157,7 +157,7 @@ static bool _mi_heap_init(void) {
|
|||
// use `_mi_os_alloc` to allocate directly from the OS
|
||||
mi_thread_data_t* td = (mi_thread_data_t*)_mi_os_alloc(sizeof(mi_thread_data_t),&_mi_stats_main); // Todo: more efficient allocation?
|
||||
if (td == NULL) {
|
||||
_mi_error_message("failed to allocate thread local heap memory\n");
|
||||
_mi_error_message(ENOMEM, "failed to allocate thread local heap memory\n");
|
||||
return false;
|
||||
}
|
||||
mi_tld_t* tld = &td->tld;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue