slab allocator in c
+-------------------------+
| Memory Pool |
+-------------------------+
|
|
v
+-------------------------+ +-------------------------+
| Slab 0 | | Slab 1 |
+-------------------------+ +-------------------------+
| Free List | | Free List |
| +--------------+ | | +--------------+ |
| | Chunk 1 | ---->| | | Chunk 1 | ---->|
| +--------------+ | | +--------------+ |
| | Chunk 2 | ---->| | | Chunk 2 | ---->|
| +--------------+ | | +--------------+ |
| | Chunk 3 | ---->| | | Chunk 3 | ---->|
| +--------------+ | | +--------------+ |
| | Chunk 4 | | | | Chunk 4 | |
| +--------------+ | | +--------------+ |
| | Chunk 5 | | | | Chunk 5 | |
| +--------------+ | | +--------------+ |
+-------------------------+ +-------------------------+
...
|
|
v
+-------------------------+
| Slab N |
+-------------------------+
| Free List |
| +--------------+ |
| | Chunk 1 | ---->|
| +--------------+ |
| | Chunk 2 | ---->|
| +--------------+ |
| | Chunk 3 | ---->|
| +--------------+ |
| | Chunk 4 | |
| +--------------+ |
| | Chunk 5 | |
| +--------------+ |
+-------------------------+