3 ms·
> The real question is: how does this deal with freeing allocations from a thread that exited? I assume that they don't release the allocator assigned to a thr
by lelanthran 3y ago
> The real question is: how does this deal with freeing allocations from a thread that exited?
I assume that they don't release the allocator assigned to a thread when a thread exits, unless that allocator is holding a list of zero allocations.
That sounds like the easiest part of all of this, TBH: A single extra line of code that, after performing an actual deallocation (as opposed to sending a message to perform the deallocation), the allocator checks that it has non-zero allocations, and that the thread still exists, otherwise it deletes itself.