Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Data Structures are available in the Linux Kernel [closed]

Is there a list somewhere of all the major generic data structures used in the Linux Kernel and as a side bonus major places they're used?

What I mean by "generic data structures" is things like doubly linked lists, hash lists, timer wheels, etc.

Also, which ones are considered part of the internally provided api available to modules?

Edit

In the linux/lib directory I see some promising leads...

bitmap.c
plist.c
prio_heap.c
prio_tree.c
radix-tree.c
rbtree.c
like image 724
Robert S. Barnes Avatar asked Nov 11 '09 12:11

Robert S. Barnes


3 Answers

From what I remember the linux kernel comes with implementations of Radix Tree and Red-Black Tree.

like image 113
Graphics Noob Avatar answered Oct 16 '22 09:10

Graphics Noob


So, the best way to find out about kernel data structures is via the header files normally found at /usr/include. A thorough examination of these can be found in in this free on-line resource as well as many other sources:

Kernel Architecture

Two excellent books are:

Linux Kernel Architecture

Understanding the Linux Kernel

like image 37
ennuikiller Avatar answered Oct 16 '22 09:10

ennuikiller


A relevant LWN article: Linux kernel design patterns - part 2

like image 43
u0b34a0f6ae Avatar answered Oct 16 '22 09:10

u0b34a0f6ae