mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 03:48:42 +03:00
merge from dev-reset
This commit is contained in:
commit
a836d233ff
4 changed files with 19 additions and 10 deletions
|
@ -1,3 +1,5 @@
|
|||
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
Copyright (c) 2019-2022, Microsoft Research, Daan Leijen
|
||||
This is free software; you can redistribute it and/or modify it under the
|
||||
|
@ -190,7 +192,7 @@ static mi_decl_noinline void* mi_arena_alloc_from(mi_arena_t* arena, size_t aren
|
|||
*commit = _mi_bitmap_is_claimed_across(arena->blocks_committed, arena->field_count, needed_bcount, bitmap_index);
|
||||
}
|
||||
|
||||
// mi_track_mem_undefined(p,needed_bcount*MI_ARENA_BLOCK_SIZE);
|
||||
mi_track_mem_undefined(p,needed_bcount*MI_ARENA_BLOCK_SIZE); // todo: should not be needed?
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@ -752,3 +754,4 @@ int mi_reserve_huge_os_pages(size_t pages, double max_secs, size_t* pages_reserv
|
|||
if (err==0 && pages_reserved!=NULL) *pages_reserved = pages;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,6 @@ static mi_option_desc_t options[_mi_option_last] =
|
|||
{ 16, UNINIT, MI_OPTION(max_errors) }, // maximum errors that are output
|
||||
{ 16, UNINIT, MI_OPTION(max_warnings) }, // maximum warnings that are output
|
||||
{ 8, UNINIT, MI_OPTION(max_segment_reclaim)},// max. number of segment reclaims from the abandoned segments per try.
|
||||
{ 1, UNINIT, MI_OPTION_LEGACY(allow_purge, allow_decommit) }, // decommit slices when no longer used (after decommit_delay milli-seconds)
|
||||
{ 100, UNINIT, MI_OPTION(deprecated_segment_decommit_delay) }, // decommit delay in milli-seconds for freed segments
|
||||
{ 1, UNINIT, MI_OPTION_LEGACY(purge_extend_delay, decommit_extend_delay) },
|
||||
{ 0, UNINIT, MI_OPTION(destroy_on_exit)}, // release all OS memory on process exit; careful with dangling pointer or after-exit frees!
|
||||
|
@ -91,7 +90,8 @@ static mi_option_desc_t options[_mi_option_last] =
|
|||
#else
|
||||
{ 128L*1024L, UNINIT, MI_OPTION(arena_reserve) },
|
||||
#endif
|
||||
{ 100, UNINIT, MI_OPTION(arena_purge_delay) } // reset/decommit delay in milli-seconds for arena allocation
|
||||
{ 100, UNINIT, MI_OPTION(arena_purge_delay) }, // reset/decommit delay in milli-seconds for arena allocation
|
||||
{ 1, UNINIT, MI_OPTION(allow_purge) } // allow decommit/reset to free (physical) memory back to the OS
|
||||
};
|
||||
|
||||
static void mi_option_init(mi_option_desc_t* desc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue