Replicate the logic of the previous allocator, but in safe code using a struct.
Right now the alloc functions return a unique chunk object with the start point and the length. This would almost certainly look more complex in a more robust allocator, since the allocator would likely want to keep track of the allocated chunks for itself, or have the chunks store references to other chunks. Happy to make this look any way that makes sense, this is all uncharted territory to me but has been a lot of fun to hack on.
Replicate the logic of the previous allocator, but in safe code using a struct.
Right now the alloc functions return a unique chunk object with the start point and the length. This would almost certainly look more complex in a more robust allocator, since the allocator would likely want to keep track of the allocated chunks for itself, or have the chunks store references to other chunks. Happy to make this look any way that makes sense, this is all uncharted territory to me but has been a lot of fun to hack on.