mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-06 23:39:31 +03:00
fix all_committed
This commit is contained in:
parent
fa01875eb2
commit
1d946146cc
1 changed files with 3 additions and 3 deletions
|
@ -228,14 +228,14 @@ void* _mi_arena_alloc(size_t size, bool* commit, bool* large, bool* is_pinned, b
|
|||
Arena free
|
||||
----------------------------------------------------------- */
|
||||
|
||||
void _mi_arena_free(void* p, size_t size, size_t memid, bool is_committed, mi_os_tld_t* tld) {
|
||||
void _mi_arena_free(void* p, size_t size, size_t memid, bool all_committed, mi_os_tld_t* tld) {
|
||||
mi_assert_internal(size > 0 && tld->stats != NULL);
|
||||
if (p==NULL) return;
|
||||
if (size==0) return;
|
||||
|
||||
if (memid == MI_MEMID_OS) {
|
||||
// was a direct OS allocation, pass through
|
||||
_mi_os_free_ex(p, size, is_committed, tld->stats);
|
||||
_mi_os_free_ex(p, size, all_committed, tld->stats);
|
||||
}
|
||||
else {
|
||||
// allocated in an arena
|
||||
|
@ -258,7 +258,7 @@ void _mi_arena_free(void* p, size_t size, size_t memid, bool is_committed, mi_os
|
|||
}
|
||||
// potentially decommit
|
||||
if (arena->is_committed) {
|
||||
mi_assert_internal(all_committed);
|
||||
mi_assert_internal(all_committed); // note: may be not true as we may "pretend" to be not committed (in segment.c)
|
||||
}
|
||||
else {
|
||||
mi_assert_internal(arena->blocks_committed != NULL);
|
||||
|
|
Loading…
Add table
Reference in a new issue