4 ms·
The Linux kernel uses intrusive data structures to avoid a superfluous memory allocation and cache-friendliness. There's also an intrusive Red-black tree and Ra
by infamouscow 4y ago
The Linux kernel uses intrusive data structures to avoid a superfluous memory allocation and cache-friendliness. There's also an intrusive Red-black tree and Radix tree implementation in the kernel.
- _0w8t 4y agoA linked list is not cache friendly unless the nodes are allocated mostly nearby. But if one can ensure such allocation, then why not to use an array or at least a list of small arrays?
- megous 4y agoThe kernel uses struct embedding for puting structs into lists. You can't do that with an array.