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 a pointer on a pointer in c programming language?
What does the characters “r” and “w” mean when writing programs that will make use of files?
diff between exptected result and requirement?
What are enumerated types?
Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers
What is void pointers in c?
Explain the difference between the local variable and global variable in c?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
how can use subset in c program and give more example
What are the rules for the identifier?
What is the use of header?
How can you read a directory in a C program?
How can I find the modification date of a file?
What is a structural principle?
What is scope rule of function in c?