mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 11:58:41 +03:00
add heap region check to cfree
This commit is contained in:
parent
dd79b662f8
commit
3d6feead60
2 changed files with 4 additions and 1 deletions
|
@ -38,7 +38,9 @@ size_t mi_malloc_usable_size(const void *p) mi_attr_noexcept {
|
|||
}
|
||||
|
||||
void mi_cfree(void* p) mi_attr_noexcept {
|
||||
mi_free(p);
|
||||
if (mi_is_in_heap_region(p)) {
|
||||
mi_free(p);
|
||||
}
|
||||
}
|
||||
|
||||
int mi_posix_memalign(void** p, size_t alignment, size_t size) mi_attr_noexcept {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue