mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
rename segment_map_destroy to segment_map_unsafe_destroy
This commit is contained in:
parent
a046b6ff33
commit
9561ae4286
4 changed files with 7 additions and 4 deletions
|
@ -682,7 +682,7 @@ void mi_cdecl _mi_process_done(void) {
|
|||
mi_collect(true /* force */);
|
||||
_mi_heap_unsafe_destroy_all(); // forcefully release all memory held by all heaps (of this thread only!)
|
||||
_mi_arena_unsafe_destroy_all();
|
||||
_mi_segment_map_destroy();
|
||||
_mi_segment_map_unsafe_destroy();
|
||||
}
|
||||
|
||||
if (mi_option_is_enabled(mi_option_show_stats) || mi_option_is_enabled(mi_option_verbose)) {
|
||||
|
|
|
@ -126,9 +126,9 @@ mi_decl_nodiscard mi_decl_export bool mi_is_in_heap_region(const void* p) mi_att
|
|||
return mi_is_valid_pointer(p);
|
||||
}
|
||||
|
||||
void _mi_segment_map_destroy(void) {
|
||||
void _mi_segment_map_unsafe_destroy(void) {
|
||||
for (size_t i = 0; i < MI_SEGMENT_MAP_MAX_PARTS; i++) {
|
||||
mi_segmap_part_t* part = mi_segment_map[i];
|
||||
mi_segmap_part_t* part = mi_atomic_exchange_ptr_relaxed(mi_segmap_part_t, &mi_segment_map[i], NULL);
|
||||
if (part != NULL) {
|
||||
_mi_os_free(part, sizeof(mi_segmap_part_t), part->memid);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue