3 ms·
> This time the generic linked list functions got > converted to become malloc-less (the way > linked list functions should behave, really). I don't see how
by ape4 10y ago
> This time the generic linked list functions got
> converted to become malloc-less (the way
> linked list functions should behave, really).
I don't see how a linked list can not use malloc().
- rumcajz 10y agoLook for intrusive containers.
- ape4 10y agoTIL, thanks.
- hota_mazi 10y agoHave each node of data contain the `prev` and `next` link. You are "polluting" your payload with list information, but you gain malloc less lists.
- Someone 10y agoAnd cache locality. That can have considerable impact if you frequently search that list for an item satisfying some condition.