Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 9. Process Address Space > The Memory Descriptor

9.2. The Memory Descriptor

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

Table 9-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
struct rb_root 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
unsigned long (*)( )get_unmapped_areaMethod that searches an available linear address interval in the process address space
void (*)( )unmap_areaMethod invoked when releasing a linear address interval
unsigned longmmap_baseIdentifies the linear address of the first allocated anonymous memory region or file memory mapping (see the section "Program Segments and Process Memory Regions" in Chapter 20)
unsigned longfree_area_cacheAddress from which the kernel will look for a free interval of linear addresses in the process address space
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 of User Mode stack
unsigned long arg_start Initial address of command-line arguments
unsigned long arg_end Final address of command-line arguments
unsigned long env_start Initial address of environment variables
unsigned long env_end Final address of environment variables
unsigned long rss Number of page frames allocated to the process
unsigned longanon_rssNumber of page frames assigned to anonymous memory mappings
unsigned long total_vm Size of the process address space (number of pages)
unsigned long locked_vm Number of "locked" pages that cannot be swapped out (see Chapter 17)
unsigned longshared_vmNumber of pages in shared file memory mappings
unsigned longexec_vmNumber of pages in executable memory mappings
unsigned longstack_vmNumber of pages in the User Mode stack
unsigned longreserved_vmNumber of pages in reserved or special memory regions
unsigned long def_flags Default access flags of the memory regions
unsigned longnr_ptesNumber of Page Tables of this process
unsigned long [] saved_auxv Used when starting the execution of an ELF program (see Chapter 20)
unsigned int dumpable Flag that specifies whether the process can produce a core dump of the memory
cpumask_t cpu_vm_mask Bit mask for lazy TLB switches (see Chapter 2)
mm_context_t context Pointer to table for architecture-specific information (e.g., LDT's address in 80 — 86 platforms)
unsigned longswap_token_timeWhen this process will become eligible for having the swap token (see the section "The Swap Token" in Chapter 17)
charrecent_pageinFlag set if a major Page Fault has recently occurred
intcore_waitersNumber of lightweight processes that are dumping the contents of the process address space to a core file (see the section "Deleting a Process Address Space" later in this chapter)
struct completion *core_startup_donePointer to a completion used when creating a core file (see the section "Completions" in Chapter 5)
struct completioncore_doneCompletion used when creating a core file
rwlock_tioctx_list_lockLock used to protect the list of asynchronous I/O contexts (see Chapter 16)
struct kioctx *ioctx_listList of asynchronous I/O contexts (see Chapter 16)
struct kioctxdefault_kioctxDefault asynchronous I/O context (see Chapter 16)
unsigned longhiwater_rssMaximum number of page frames ever owned by the process
unsigned longhiwater_vmMaximum number of pages ever included in the memory regions of the process



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint