How can I create a buffer in linux kernel without malloc()
function (or calloc()
) and clean buffer without free()
function?
You cannot use standard c library functions like malloc()
or calloc()
inside the kernel, The code you write in kernel links to the functionality provided by the kernel itself.
You can use kmalloc() & then free it with kfree().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With