3 ms·
Wow, that's a mouthful, and appears to be very well written. I hope to find a little bit of wisdom in there that is applicable in practical programs, not only g
by jstimpfle 7y ago
Wow, that's a mouthful, and appears to be very well written. I hope to find a little bit of wisdom in there that is applicable in practical programs, not only general memory allocators.
One approach that I miss here (or at least haven't found yet) is moving memory around, i.e. manual defragmentation. That's not a generic allocation strategy though, since it requires knowledge that there are no live pointers to the old address of each allocation that is moved. But it's very practical - a simple example is removing an arbitrary element from a vector by moving the last element in its place, then shrinking the vector from the end.