4 ms·
> wait ... what!? There's whole allocation strategies built around this idea. One of the simpler, more charming ones is a 'bump' allocator. The implementation
by troutwine 4y ago
> wait ... what!?
There's whole allocation strategies built around this idea. One of the simpler, more charming ones is a 'bump' allocator. The implementation of malloc bumps an offset in contiguous blob of bytes and free does nothing at all. malloc is very cheap, the OS takes care of dealing with the contiguous blob of bytes. Bump past the end of the blob and your program crashes.
- celrod 4y agoSmarter bump allocator implementations, like the one in llvm, will allocate a new blob instead of bumping past the end of an old one.