To understand kernel development, one must first understand the environment. The Linux kernel is a monolithic kernel, meaning the entire operating system kernel runs in a single address space. However, it supports loadable kernel modules (LKM), allowing code to be loaded and unloaded dynamically.
| Feature | kmalloc | vmalloc | | :--- | :--- | :--- | | | Contiguous | Non-contiguous | | Virtual Memory | Contiguous | Contiguous | | Max Size | ~4MB (depends on order) | Large (virtual space only) | | Speed | Fast | Slow (remaps page tables) | | Use Case | Small data structures, I/O buffers | Large, infrequent allocations | linux kernel internals and development -lfd420- pdf
MODULE_LICENSE("GPL"); MODULE_AUTHOR("LFD420 Student"); MODULE_DESCRIPTION("A canonical example from the PDF"); To understand kernel development, one must first understand
LFD420 teaches you how to configure, build, and install a custom Linux kernel from source, followed by a deep dive into the major subsystems of the kernel. By the end of the course, a developer should be able to write loadable kernel modules (LKMs) and patch existing kernel code. | Feature | kmalloc | vmalloc | |