Reputation: 123
How can I create a buffer in linux kernel without malloc() function (or calloc()) and clean buffer without free() function?
malloc()
calloc()
free()
Upvotes: 5
Views: 596
Reputation: 206666
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().
Upvotes: 8