Comment by AlotOfReading
5 years ago
That's just a slab allocator. They're not what I'd call trivial, but still simple enough to be common in small projects and CS homework. I agree that an array is still generally simpler though.
5 years ago
That's just a slab allocator. They're not what I'd call trivial, but still simple enough to be common in small projects and CS homework. I agree that an array is still generally simpler though.
Once you are implementing your own allocator you need to worry about fragmentation under many operations, which would be the majority of the complexity.