I've known that we have Kernel space and User space in a Linux system. User space is used by some specific program, and it can communicate with Kernel space with some way, for example, system call.
I've also known that a program uses the memory with the rule: Memory layout, we have Stack, Heap, Text, BSS, Data etc.
Now I have a question: what is the relation between Memory layout and Kernel/User space? Must Memory layout be in the User space? Or are the two notions irrelevant?