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
Chia sẻ với bạn bè của bạn: