The Linux Programming Interface: a linux and unix system Programming Handbook



tải về 6.93 Mb.
Chế độ xem pdf
trang9/806
Chuyển đổi dữ liệu08.07.2022
Kích6.93 Mb.
#52607
1   ...   5   6   7   8   9   10   11   12   ...   806
The Linux Programming Interface

6
PROCESSES
 113
6.1
Processes and Programs............................................................................................. 113
6.2
Process ID and Parent Process ID................................................................................. 114
6.3
Memory Layout of a Process ....................................................................................... 115
6.4
Virtual Memory Management ..................................................................................... 118
6.5
The Stack and Stack Frames ....................................................................................... 121
6.6
Command-Line Arguments (
argc

argv
) ......................................................................... 122
6.7
Environment List ........................................................................................................ 125
6.8
Performing a Nonlocal Goto: 
setjmp()
and 
longjmp()
.................................................... 131
6.9
Summary.................................................................................................................. 138
6.10
Exercises .................................................................................................................. 138


Contents in Detail
xiii
7
MEMORY ALLOCATION
 139
7.1
Allocating Memory on the Heap ................................................................................. 139
7.1.1
Adjusting the Program Break: 
brk()
and 
sbrk()
.......................................... 139
7.1.2
Allocating Memory on the Heap: 
malloc()
and 
free()
................................. 140
7.1.3
Implementation of 
malloc()
and 
free()
...................................................... 144
7.1.4
Other Methods of Allocating Memory on the Heap ................................... 147
7.2
Allocating Memory on the Stack: 
alloca()
..................................................................... 150
7.3
Summary.................................................................................................................. 151
7.4
Exercises .................................................................................................................. 152

tải về 6.93 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   5   6   7   8   9   10   11   12   ...   806




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương