Question: The library routine ma/lc allocates more data space to a process by invoking the brk system call, and the library routine free releases memory previously
The library routine ma/lc allocates more data space to a process by invoking the brk system call, and the library routine free releases memory previously allocated by malloc. The syntax for the calls is ptr malloc (size);
where size is an unsigned integer representing the number of bytes to allocate, and ptr is a character pointer that points to the newly acquired space. When used as a parameter for free, ptr must have been previously returned by malloc. Implement the library routines.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
