4 ms·
whats a offset allocator?
by mgrithm 2y ago
whats a offset allocator?
- jjtheblunt 2y agohttps://github.com/sebbbi/OffsetAllocator https://github.com/sebbbi/OffsetAllocator which has links to a pertinent paper at the end of that page.
- hinkley 2y agoThat doesn't explain anything. And the linked paper doesn't even contain the word 'offset'.
- jjtheblunt 2y agoI mean you could presumably read the code. It looks like the general idea of TLSF is an array of second level arrays, where the second level arrays hold blocks of fixed size, and in TLSF those fixed sizes for the secondary arrays increase as powers of 2, and in this so called offset allocator the secondary level arrays use a more complex size statistically chosen. Allocation requests seemingly return an offset into a second level array. Kinda uncommented code, to your point, makes it not obvious.