1, see "21 days to learn C + +" P92 function principle of division RAM, feeling or vaguely, not quite understand, further inquiry???
2, when the program starts, the operating system (such as dos,windows, etc.) will be based on the requirements of the compiler to set a variety of memory areas.
A common concern for a C + + programmer is the global namespace, free memory, registers, code spaces, and stacks.
3. Register: A special Storage area in the CPU, the register of the Register group that points to the next line of code at any given moment is called the instruction pointer. The task of the instruction pointer is to track which line of code will be executed next.
4, Code space: the code itself is stored in the code space, each line of code is converted into a series of binary forms of instruction, and then stored in the code space. The instruction pointer holds the address of the instruction to be executed next.
5, Stack: used to store each function in the program to say the required data, the stack is in-first out, in sharp contrast with the first-in, first-out queue. A stack is a function call that pushes the required parameters of the called function into the stack to implement a function call.
The specific role of the stack:
1, passing parameters (providing parameters for the called function)
2, saving local variables
3, Save intermediate variables
4. Save the State of the task (for example, the value of each register) in the system with a stack
6, then explain the stack and function call this piece can not understand??
How does the function work--partition RAM do not understand Ah???