The Memory Descriptor

All information related to the process address space is included in a data structure called a memory descriptor . This structure of type mm_struct is referenced by the mm field of the process descriptor. The fields of a memory descriptor are listed in Table 8-2.

Table 8-2. The fields of the memory descriptor

Type

Field

Description

struct vm_area_struct *

mmap

Pointer to the head of the list of memory region objects

rb_root_t

mm_rb

Pointer to the root of the red-black tree of memory region objects

struct vm_area_struct *

mmap_cache

Pointer to the last referenced memory region object

pgd_t *

pgd

Pointer to the Page Global Directory

atomic_t

mm_users

Secondary usage counter

atomic_t

mm_count

Main usage counter

int

map_count

Number of memory regions

struct rw_semaphore

mmap_sem

Memory regions’ read/write semaphore

spinlock_t

page_table_lock

Memory regions’ and Page Tables’ spin lock

struct list_head

mmlist

Pointers to adjacent elements in the list of memory descriptors

unsigned long

start_code

Initial address of executable code

unsigned long

end_code

Final address of executable code

unsigned long

start_data

Initial address of initialized data

unsigned long

end_data

Final address of initialized data

unsigned long

start_brk

Initial address of the heap

unsigned long

brk

Current final address of the heap

unsigned long

start_stack

Initial address ...

Get Understanding the Linux Kernel, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.