Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

If my understanding is not wrong, every process has a Kernel Address space associated with it (which is typically 1GB). As far as local variables are concerned, they are assigned on the kernel stack and so their virtual address is according to the address of the kernel stack.

However, if there are global variables in the kernel code, what will be the virtual address of these variables? When and who will assign this address? If it is the compiler, how does the compiler know that some part of code is kernel code?

Sorry for asking such a naive question, but I'm really confused here.

share|improve this question
    
see stackoverflow.com/questions/13013491/… –  msw Aug 21 '13 at 23:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.