Too Long; Didn't Read
A compiled program is broken into five segments: text, data, bss, heap, and stack. When a program begins executing, the RIP (the register that points to the currently executing instruction), is set to the first machine language instruction in the text segment. The stack (the memory stack) is made up of many different stack frames. In C, programmers can use the function malloc() to dynamically allocate memory on the heap. The heap is not of fixed size and can grow larger or smaller depending on how much memory the programmer is using.