Search code examples
clinux-kernelkerneldrivermemset

What is the Linux kernel equivalent to the memset function?


I'm writing a driver that requires me to clear all the memory allocated to zero. memset is a userspace function, but I would like to know if the kernel provides a macro that helps me do this.


Solution

  • According to this thread and people commenting here that have used it, memset is available in kernel code. Maybe you just forgot to

    #include <string.h>