3 ms·
I'm not a contributor to snmalloc or affiliated in any way. I'm going to reimplement snmalloc in C for my own code. I'm going to avoid that problem by using s
by gavinhoward 3y ago
I'm not a contributor to snmalloc or affiliated in any way.
I'm going to reimplement snmalloc in C for my own code.
I'm going to avoid that problem by using structured concurrency. Under my system, threads only get data from threads that are ancestors. (There will be a way of getting data from a non-ancestor, but it will effectively keep the allocating thread alive until the using thread is done.)
The reason I'm going to use snmalloc is because of structured concurrency; it's like it was designed for structured concurrency.
- fanf2 3y agoHave you considered using mimalloc? I gather it has a similar design to snmalloc, but mimalloc is written in C.
- gavinhoward 3y agoI did, but I don't want to have a dependency on Microsoft code. Plus, there are some changes I will make to make my snmalloc/mimalloc clone more friendly to structured concurrency. Nothing major, stuff to mostly deal with realloc().