Learning: memory partition model

C ++ program is executed, the general direction of the memory is divided into four regions:

1, the code area: storing the binary code of the function body is managed by the operating system
2, the global area: storing global and static variables and constants
3, the stack area: automatically allocated by the compiler release, storage function parameters, the local variables
4, heap area: by the programmer allocation and release, if the programmer does not release, recovered at the end of the program by the operating system

Guess you like

Origin www.cnblogs.com/zpchcbd/p/11847340.html