How can i check if a function is part of the kernel or user space? (or could be both too) Is there any overview over all kernel libs/functions?
Working with C in Unix environment.
e.g. rand()
is pure user space, malloc()
is user and kernel space etc..
The manual pages doesn't contain any information.
This article should give you some info on system calls (into kernel space). Now you can use this rough (and not very accurate) guideline:
All man pages from section 2 are system calls.
If a man page is from section 3, look in the SEE ALSO part at the bottom to see if it uses any commands from section 2. (Might also need to read through the man page itself.)
Again, this is not very accurate, but short of reading the source code, it should give you an idea.