Stacks of Linux processes and stack frames of functions in process

Source: Internet
Author: User

The main understanding of the Linux process stack and function of the stack frame differences and contact


is depicted in a Linux process structure diagram, where this article wants to focus on the stack as shown in the 0xc0000000 address decrement of a process memory area of the Linux system for each process assigned to the actual size of the overall understanding of the Linux process stack is so much, That is 1) the bottom of the stack in the 0xc0000000 (do not need a stack of pointers, the function of the stack frame to need a stack of pointers) 2) The growth direction of the stack, the address descending direction 3) stack top pointer esp4) size is unknown (not the focus of this article) 5) What is the contents of the store?
Another concept is that the concept of the stack frame of the function mentioned above and the stack frame of its relationship function with the Linux process stack are in the structure of the stack in the process and the allocation of the address space and the actual in-memory function of the stack frame the overall understanding is: 1) EBP is the stack frame of the function stack 2) ESP is the stack top 3) The stack frame of all the functions of a process is built when calling this function After returning the caller, the stack frame of the function is no longer present 4) the creation and disappearance of the stack frame of all functions is a dynamic process that varies with the execution of the process
The function in the process to solve in the stack provided by the process is the caller and the callee's relationship 1) How to enter the callee from the caller? 2) How to return the caller from the callee? 3) How does the caller control the callee (passed by the modulated function parameter)? 4) How the value of the person being tuned is reflected (the return value is passed)? such as

Stacks of Linux processes and stack frames of functions in process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.