a.k.a. memory allocation
The Operating system allocates memory to processes, so that a process can only access that portion of memory.
This memory is divided into:
The addresses that the program uses to reference variables are actually Virtual memory addresses, which the operating system translates to physical memory.
https://en.wikipedia.org/wiki/Memory_management
Malloc (a function available in C/C++ is used to put variables in the heap instead of the read only "text section".
https://www.wikiwand.com/en/Garbage_collection_(computer_science)
What and where are the stack and heap?
http://stackoverflow.com/questions/18446171/how-do-compilers-assign-memory-addresses-to-variables
htop