what Kernel do if user call malloc() function in user space?
I am just wondering what Kernel actually does if a user calls malloc() function in user space. What I am understanding that Kernel has its own memory allocators like buddy and slab. But they are handling contiguous physical memories.
My question is that if an application calls malloc function, then what happens in Kernel? How Kernel allocates memories for the application.
It seems to me that malloc function uses mmap system calls, but still don't understand how they are connected to Kernel's task_struct.
Is there anyone who can answer to my questions?