Answer Posted / raghavan
Every process has a address boundary. When a process does a malloc, memory is allocated from this boundary location and the process address boundary is moved to the new end. In linux, there is a function sbrk() that allows to change the process address boundary. sbrk(0) will return the current process address boundary and sbrk(n) will move the process boundary by n bytes.
malloc internally uses this feature to allocate memory for the requesting process.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is an arrays?
What is the sizeof () a pointer?
Write a program to print fibonacci series using recursion?
Tell me what is null pointer in c?
What are the advantages of using new operator as compared to the function malloc ()?
I need a sort of an approximate strcmp routine?
How can I remove the leading spaces from a string?
regarding pointers concept
Is printf a keyword?
Why we write conio h in c?
Explain the array representation of a binary tree in C.
What does dm mean sexually?
Can static variables be declared in a header file?
What is a file descriptor in c?
Why use int main instead of void main?