Nim
Nim copied to clipboard
Allocator: Handle basic dead threads with unshared memory
trafficstars
Ref: https://github.com/nim-lang/Nim/issues/23361
Fixes the first example in referenced issue. The second example requires that pages can be inherited as creating a string allocates which then causes a cell to be moved into a foreign thread.
next and prev fields of SmallChunk are kept around for now as I suspect they will help for the more complicated case.