The sysfs is a RAM based virtual file system and provides details on various kernel objects. It provides a means to export kernel data structures, attributes and their linkages between the kernel objects and the user space. if “CONFIG_SYSFS” is enabled during build, “sysfs” is in-built into the linux image. The file system can also […]
Example Linux Memory Allocation Code
The below code provides an example allocation of “kmalloc“, “vmalloc“, “kcalloc” and “kzalloc” APIs in the Linux kernel code. for the different APIs and information about the APIs, refer the article – Allocating Memory in the Linux Kernel Module The “kmalloc” API provides a contiguous block of memory in both virtual and physical address space […]