Problem using kmalloc
#include<linux/slab.h>
main() { int *p; p = kmalloc(sizeof(int)*10); } I am trying to use the basic program , but it is saying that linux/slab.h: No such file or directory .. I tried locating linux/slab.h manually but still it is not compiling . I would really appreciate someone if you could help me using kmalloc successfully. |
have you found this slab.h?
maybe this helps: http://www.linuxforums.org/forum/ubu...ce-driver.html |
How are you compiling the module , can you show the makefile.
|
What are you trying to do?. kmalloc is not a userspace function, you need to use this for kernel programs. no main() function in kernel.
|
All times are GMT -5. The time now is 04:40 PM. |