mimalloc icon indicating copy to clipboard operation
mimalloc copied to clipboard

mi_is_in_heap_region asserting in debug

Open honkstar1 opened this issue 2 years ago • 2 comments

We are using mi_is_in_heap_region to figure out of a pointer is owned by mimalloc or not. In debug this function asserts in some of our scenarios. Is this expected?

If it is, then it would be awesome to get another function that can take a pointer and tell if that pointer is an allocation owned by mimalloc or not

Thank you, Henrik

honkstar1 avatar Oct 29 '23 00:10 honkstar1

Forgot to paste the assert:

mimalloc: assertion failed: at mimalloc\2.1.2\src\segment-map.c:74, _mi_segment_of assertion: "segment != NULL"

honkstar1 avatar Oct 29 '23 01:10 honkstar1

It seems like the addresses that are causing the asserts are very low... like 0x600000. Do they need to be >= 0x4000000 for mimalloc to be happy on a 64bit system?

honkstar1 avatar Oct 29 '23 05:10 honkstar1