Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Modify the program in Example 7-1 (free_and_sbrk.c) to print out the current value of the program break after each execution of malloc(). Run the program specifying a small allocation block size. This will demonstrate that malloc() doesn’t employ sbrk() to adjust the program break on each call, but instead periodically allocates larger chunks of memory from which it passes back small pieces to the caller.
(Advanced) Implement malloc() and free().