What is the difference between memset and kmalloc
Sorry for not being able to type Chinese.I am a new hand in device driver development. The question may be stupid.
When I read the kernal code of a driver, in the __init function, I find to allocate memory to a per-device structure, some codes use kmalloc, but some codes use memset.
Can someone tell me the difference ?
Thx. Have been solved.
I find that when codes use memset, the per-device struct variable is defined with the keyword static. memset and kmalloc is so different,you mast see them with manual.
页:
[1]