Skip to main content
added 77 characters in body
Source Link
Tim
  • 107k
  • 234
  • 651
  • 1.1k

From The Linux Programming Interface:

enter image description here

  1. Where is the kernel stack (mentioned in the quote below) in the above diagram?

    Is it the top part "Kernel (mapped into process virtual memory, but no accessilto program)" in the above diagram?

the term user stack is used to distinguish the stack we describe here from the kernel stack. The kernel stack is a per-process memory region maintained in kernel memory that is used as the stack for execution of the functions called internally during the execution of a system call. (The kernel can’t employ the user stack for this purpose since it resides in unprotected user memory.)

  1. Where are "Frames for C run-time startup functions" and "Frame for main()" (mentioned from the diagram below) in the above diagram?

    Is "argv, environ" in the above diagram "Frames for C run-time startup functions", "Frame for main()", or part of either?

    enter image description here

  2. What is the lowest segment between 0x00000000 and 0x08048000 used for?

Thanks.

From The Linux Programming Interface:

enter image description here

  1. Where is the kernel stack (mentioned in the quote below) in the above diagram?

    Is it the top part "Kernel (mapped into process virtual memory, but no accessilto program)" in the above diagram?

the term user stack is used to distinguish the stack we describe here from the kernel stack. The kernel stack is a per-process memory region maintained in kernel memory that is used as the stack for execution of the functions called internally during the execution of a system call. (The kernel can’t employ the user stack for this purpose since it resides in unprotected user memory.)

  1. Where are "Frames for C run-time startup functions" and "Frame for main()" (mentioned from the diagram below) in the above diagram?

    Is "argv, environ" in the above diagram "Frames for C run-time startup functions", "Frame for main()", or part of either?

    enter image description here

Thanks.

From The Linux Programming Interface:

enter image description here

  1. Where is the kernel stack (mentioned in the quote below) in the above diagram?

    Is it the top part "Kernel (mapped into process virtual memory, but no accessilto program)" in the above diagram?

the term user stack is used to distinguish the stack we describe here from the kernel stack. The kernel stack is a per-process memory region maintained in kernel memory that is used as the stack for execution of the functions called internally during the execution of a system call. (The kernel can’t employ the user stack for this purpose since it resides in unprotected user memory.)

  1. Where are "Frames for C run-time startup functions" and "Frame for main()" (mentioned from the diagram below) in the above diagram?

    Is "argv, environ" in the above diagram "Frames for C run-time startup functions", "Frame for main()", or part of either?

    enter image description here

  2. What is the lowest segment between 0x00000000 and 0x08048000 used for?

Thanks.

Source Link
Tim
  • 107k
  • 234
  • 651
  • 1.1k

Where are "the kernel stack", "Frames for C run-time startup functions", and "Frame for main()" in the memory layout of a program?

From The Linux Programming Interface:

enter image description here

  1. Where is the kernel stack (mentioned in the quote below) in the above diagram?

    Is it the top part "Kernel (mapped into process virtual memory, but no accessilto program)" in the above diagram?

the term user stack is used to distinguish the stack we describe here from the kernel stack. The kernel stack is a per-process memory region maintained in kernel memory that is used as the stack for execution of the functions called internally during the execution of a system call. (The kernel can’t employ the user stack for this purpose since it resides in unprotected user memory.)

  1. Where are "Frames for C run-time startup functions" and "Frame for main()" (mentioned from the diagram below) in the above diagram?

    Is "argv, environ" in the above diagram "Frames for C run-time startup functions", "Frame for main()", or part of either?

    enter image description here

Thanks.