In this section, we will dig a bit deeper into dynamic memory management with the malloc(3) API family. Understanding these areas, and the content of Chapter 5, Linux Memory Issues, and Chapter 6, Debugging Tools for Memory Issues, will go a long way in helping developers effectively debug common memory bugs and issues.
Beyond the basics
The program break
When a process or thread wants memory, it invokes one of the dynamic memory routines—usually malloc(3) or calloc(3); this memory (usually) comes from the heap segment. As mentioned earlier, the heap is a dynamic segment – it can grow (toward higher virtual addresses). Obviously though, at any given point in time, the heap has an endpoint or top beyond which...