IF YOUR KERNEL BECOMES LARGER AS A RESULT OF USING HEADER FILES, YOU ARE DOING IT WRONG.
A header file contains *only* function and variable declarations.
A simple header file: (the right way)
Code: Select all
void *malloc(size_t bytes);
void free(void *ptr);
extern int errno;
There should be absolutely *no* change in size as a result of doing this.
However, there *will* be a change in size if you put the function and variable *definitions* in header files. This is because all the functions are being included in your kernel as many times as they are used. This is WRONG.