3 ms·
I hope not. Kernel programmers need to be paranoid. This is a classic idea for doubly linked lists. The empty list has the head element linked to itself in bot
by Animats 6y ago
I hope not. Kernel programmers need to be paranoid.
This is a classic idea for doubly linked lists. The empty list has the head element linked to itself in both directions. Buffer rings are sometimes organized that way. The cases for doubly linked lists are messier.
Bear in mind that in modern CPUs, branches to nearby code are almost free, but indirection to far memory is expensive.