Hi, recently I have come across a question, how can we allocate a part of kernel space to user space. I have understood that we have use mmap() function. But I want to know what the kernel does when we call a mmap function how does it allocate, and after allocating while using the space I want to know how kernel manages that space from user space to kernel space.

Thanks in advance
Mahesh Gupta