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 auto keyword in c?
Tell me can the size of an array be declared at runtime?
How can I trap or ignore keyboard interrupts like control-c?
What is variable in c example?
Is c weakly typed?
diff between exptected result and requirement?
Explain the advantages of using macro in c language?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
Here is a neat trick for checking whether two strings are equal
What is the hardest programming language?
Differentiate between functions getch() and getche().
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
Why is c still so popular?
Can you add pointers together? Why would you?
Which is best book for data structures in c?