This preview shows page 1. Sign up to view the full content.
Unformatted text preview: memory allocator maintains an area of a process’s virtual memory known as the heap (Figure 10.35). In most Unix systems, the heap is an area of demand-zero memory that begins immediately after the uninitialized bss area and grows upward (towards higher addresses). For each process, the kernel maintains a variable brk (pronounced “break”) that points to the top of the heap.
user stack Memory mapped region for shared libraries heap grows upward heap uninitialized data (.bss) initialized data (.data) program text (.text) 0 top of the heap (brk ptr) Figure 10.35: The heap. An allocator maintains the heap as a collection of various sized blocks. Each block is a contiguous chunk of virtual memory that is either allocated or free. An allocated block has been explicitly reserved for use by the application. A free block is available to be allocated. A free block remains free until it is explicitly allocated by the application. An allocated block remains allocated until it is freed, either explicitly by the application, or implicitly b...
View Full Document
- Spring '10
- The American