News for hackers. Stuff that matters.
Re:Snmalloc: A Message Passing Allocator by gavinhoward on Wednesday October 11, 2023 @09:48PM (#37852569)
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.

Re:Snmalloc: A Message Passing Allocator by fanf2 on Thursday October 12, 2023 @08:49AM (#37856452)
Have you considered using mimalloc? I gather it has a similar design to snmalloc, but mimalloc is written in C.
Re:Snmalloc: A Message Passing Allocator by gavinhoward on Thursday October 12, 2023 @10:01AM (#37857286)
I 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().