LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what Kernel do if user call malloc() function in user space? (https://www.linuxquestions.org/questions/linux-newbie-8/what-kernel-do-if-user-call-malloc-function-in-user-space-733743/)

rsyoung 06-17-2009 07:59 PM

what Kernel do if user call malloc() function in user space?
 
Dear all:

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?

Thank you.

pixellany 06-20-2009 11:40 AM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.


All times are GMT -5. The time now is 05:51 PM.