How to create a buffer without using malloc () in the linux kernel?

How to create buffer in linux kernel without function malloc()(or calloc()) and clear buffer without function free()?

+5
source share
1 answer

You cannot use the standard functions of the c library, such as malloc()or calloc()inside the kernel, the code that you write in the kernel links to the functionality provided by the kernel itself.

You can use kmalloc () and then free it with kfree () .

+9
source

All Articles