You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The thread is no longer available, but the segment stays still keeping it's number.
After really long time, the thread_id gets reused, and as it happens the current thread has this number and wants to free object from the segment above (with the same thread_id)?
Does mimalloc handle this case gracefully?
The text was updated successfully, but these errors were encountered:
Hi @malkia -- ah, no worries -- this is handled well. In particular, when a thread terminates the _mi_thread_done is called which will "abandon" all segments and set their thread-id to 0 (and preventing reused thread-id issues). Btw. we need to keep the segments alive since they contain still live data resulting from pointers that are shared with other threads). Later, other threads can "reclaim" such abandoned segments (see _mi_segment_try_reclaim) and reuse the memory that was abandoned.
Scenario:
Does mimalloc handle this case gracefully?
The text was updated successfully, but these errors were encountered: