malloc im kernel

Wenn ich versuche, mit malloc in einem kernel-Modul bekomme ich eine Fehlermeldung vom compiler. Mein code:

res=(ListNode*)malloc(sizeof(ListNode));

Die Compiler-Fehlermeldung:

/root/ex3/ex3mod.c:491: error: implicit declaration of function ‘malloc’

Was soll ich tun?

  • in anderen Worten, wie wir alle wissen #include <stdlib.h> nicht im kernel, was zählen sollte, die ich hatte ?
InformationsquelleAutor yoavstr | 2010-05-22
Schreibe einen Kommentar