2 ms·
The fact that the author calls it a slab arena makes me think they did, indeed, intend for it to be used with a single type per arena. I do wonder why you'd wan
by electroly 3y ago
The fact that the author calls it a slab arena makes me think they did, indeed, intend for it to be used with a single type per arena. I do wonder why you'd want an allocator that is both slab and arena, though. I assume there is some use case but nothing immediately comes to mind.
- sapiogram 3y ago> The fact that the author calls it a slab arena makes me think they did, indeed, intend for it to be used with a single type per arena. Maybe? But that seems strange, since they seem to have intended it to be used for http servers making per-request allocations. Come to think of it, the arena is probably still unsound with just ints, because the underlying allocation is just for a `[]byte`, which I don't think is guaranteed to be aligned to 8 bytes. Might be on most platforms, though.