Take functions into account for kernel memory.