Linux Kernel learning notes-structvm_area_struct-Linux general technology-Linux programming and kernel information. For more information, see the following. In the Linux kernel, the most basic management unit for VM management should be struct vm_area_struct, which describes a continuous VM space with the same access attribute, the size of the virtual memory is an integer multiple of the physical memory page.
The following is the definition of the struct vm_area_struct struct:
CODE :/*
* This struct defines a memory VMM memory area. There is color: black; background-color: # a0ffff; "> vm_area_struct {
Struct mm_struct * vm_mm;/* VM area parameters */
Unsigned long vm_start;
Unsigned long vm_end;
/* Linked list of VM areas per task, sorted by address */
Struct vm_area_struct * vm_next;
Pgprot_t vm_page_prot;
Unsigned long vm_flags;
/* AVL tree of VM areas per task, sorted by address */
Short vm_avl_height;
Struct vm_area_struct * vm_avl_left;
Struct vm_area_struct * vm_avl_right;
/* For areas with an address space and backing store,
* Font-size: 10px; "> vm_area_struct * vm_next_share;
Struct vm_area_struct ** vm_pprev_share;
Struct vm_operations_struct * vm_ops;
Unsigned long vm_pgoff;/* offset in PAGE_SIZE units, * not * PAGE_CACHE_SIZE */
Struct file * vm_file;
Unsigned long vm_raend;
Void * vm_private_data;/* was vm_pte (shared mem )*/
}; |