mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 11:58:41 +03:00
allow decommit by default
This commit is contained in:
parent
6695f8ae91
commit
bbca1cd8d9
2 changed files with 2 additions and 3 deletions
|
@ -383,12 +383,11 @@ static uintptr_t mi_segment_commit_mask(mi_segment_t* segment, bool conservative
|
|||
|
||||
uintptr_t bitcount = *full_size / MI_COMMIT_SIZE; // can be 0
|
||||
if (bitidx + bitcount > MI_INTPTR_SIZE*8) {
|
||||
_mi_warning_message("%zu %zu %zu %zu 0x%p %zu\n", bitidx, bitcount, start, end, p, size);
|
||||
_mi_warning_message("commit mask overflow: %zu %zu %zu %zu 0x%p %zu\n", bitidx, bitcount, start, end, p, size);
|
||||
}
|
||||
mi_assert_internal((bitidx + bitcount) <= (MI_INTPTR_SIZE*8));
|
||||
|
||||
uintptr_t mask = (((uintptr_t)1 << bitcount) - 1) << bitidx;
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue