4 ms·
Variable size objects are addressed at the very end of the post: "Support for variable-sized objects requires a separate cyclic list for each size...".
by oecumena 4y ago
Variable size objects are addressed at the very end of the post: "Support for variable-sized objects requires a separate cyclic list for each size...".
- ulrikrasmussen 4y agoThanks, I somehow missed that line.
- ErikCorry 4y agoThat implies that you have to divide up the memory ahead of time into an area for each size? If you get the proportions wrong you will waste memory. Languages with only one object size are not exactly in vogue at the moment, so this is a major limitation.
- thesz 4y agoYou can extend or shrink circular list on the go, depending on needs. You can plan to divide memory ahead of time, but you don't have to.
- vidarh 4y ago> That implies that you have to divide up the memory ahead of time into an area for each size? No, it doesn't, as it maintains linked lists of objects, so you can use any underlying allocator to feed you objects to add to the different linked lists.