In this recipe, we will learn how the heap works in Linux. We will take a deeper look into how Linux actually provides heap memory when you use std::unique_ptr.
Although this recipe is intended for those of you who have more advanced capabilities, it is important as it will teach you what your application does to allocate memory from the heap (that is, using new()/delete()), which, in turn, will show you why heap allocations should never be done from time critical code, since they are slow. This recipe will teach you the skills you'll need when heap allocations are safe to perform and when heap allocations should be avoided in your applications, even if some of the assembly code that we inspect is hard to follow.