全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Memory layout of a process?

又称: code segment · data segment

Definition 1.7 University Computer Science — Year 1 · 第 1 章 — From Source Code to a Running Program

The memory layout of a process is the arrangement of a running program’s memory in regions. The code segment holds the machine code and, next to it, read-only data such as string literals; the data segment holds the variables that exist for the whole run, the initialised ones first and then the zero-initialised ones (traditionally called bss). Above them grows the heap, from which the program requests blocks while it runs (Chapter 5); near the top of the address space is the call stack, which holds the local variables of the functions being executed (Chapter 3).

The regions of a running program, in the order  found them, with how long an object in each region lives. The sizes are not to scale: the gap between the heap and the stack is by far the largest part of the address space.
The regions of a running program, in the order Output 1.6 found them, with how long an object in each region lives. The sizes are not to scale: the gap between the heap and the stack is by far the largest part of the address space.
在原文中阅读 →