mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-09-18 12:14:47 +03:00
merge from dev-reset
This commit is contained in:
commit
24034c997c
18 changed files with 316 additions and 765 deletions
|
@ -226,10 +226,10 @@ static mi_thread_data_t* mi_thread_data_alloc(void) {
|
|||
}
|
||||
}
|
||||
// if that fails, allocate directly from the OS
|
||||
td = (mi_thread_data_t*)_mi_os_alloc(sizeof(mi_thread_data_t), &_mi_stats_main);
|
||||
td = (mi_thread_data_t*)_mi_os_alloc(sizeof(mi_thread_data_t), NULL, &_mi_stats_main);
|
||||
if (td == NULL) {
|
||||
// if this fails, try once more. (issue #257)
|
||||
td = (mi_thread_data_t*)_mi_os_alloc(sizeof(mi_thread_data_t), &_mi_stats_main);
|
||||
td = (mi_thread_data_t*)_mi_os_alloc(sizeof(mi_thread_data_t), NULL, &_mi_stats_main);
|
||||
if (td == NULL) {
|
||||
// really out of memory
|
||||
_mi_error_message(ENOMEM, "unable to allocate thread local heap metadata (%zu bytes)\n", sizeof(mi_thread_data_t));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue