microsoft / mimalloc

mimalloc is a compact general purpose allocator with excellent performance.
MIT License
10.57k stars 861 forks source link

First class heap allocations from different threads #925

Open robertblaketaylor opened 2 months ago

robertblaketaylor commented 2 months ago

I was interested in using the direct heap functions for tracking heaps directly in our codebase, but see the caveat that:

but can only allocate from the same thread that created it.

Do you have any plans on removing this restriction?

daanx commented 2 months ago

Yes, I am planning to add this but it is not entirely trivial to do in a performant way. Currently working on improving behavior with many threads being created/terminated and blocked threads but I hopefully get to fc heaps after that.