title: How to get the sizeof a particular element in kernel space
body: <p>I am taking an Operating Systems class and we are modifying the linux kernel. </p>
  
  <p>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. </p>
  
  <p>For example, would I be able to do:</p>
  
  <p>struct newNode * myNode;</p>
  
  <p>myNode = (struct newNode *) kmalloc(sizeof(newNode), GFR_KERNEL);</p>
  
  <p>Is "sizeof" an available command in kernel space? Or is it not accessible? If so what command should I be using instead? </p>