I am taking an Operating Systems class and we are modifying the linux kernel.
One of my particular tasks involves creating a struct and allocating space for it. I was looking through the kernel api but couldn't seem to find a way to get the sizeof an element in kernel space.
For example, would I be able to do:
struct newNode * myNode;
myNode = (struct newNode *) kmalloc(sizeof(newNode), GFR_KERNEL);
Is "sizeof" an available command in kernel space? Or is it not accessible? If so what command should I be using instead?