Structvm_area_struct ** pprev dual pointer Problem
Source: Internet
Author: User
Structvm_area_struct ** pprev dual pointer problem-Linux general technology-Linux programming and kernel information. For details, see the following. Struct vm_area_struct ** pprev dual pointer Problem
// Linux/mm/mmap. c
/* Insert vm structure into process list sorted by address
* And into the inode's I _mmap ring. If vm_file is non-NULL
* Then the I _shared_lock must be held here.
*/
Void _ insert_vm_struct (struct mm_struct * mm, struct vm_area_struct * vmp)
{
Struct vm_area_struct ** pprev;
Struct file * file;
If (! Mm-> mmap_avl ){
Pprev = & mm-> mmap;
While (* pprev & (* pprev)-> vm_start <= vmp-> vm_start)
Pprev = & (* pprev)-> vm_next;
} Else {
Struct vm_area_struct * prev, * next;
Avl_insert_neighbours (vmp, & mm-> mmap_avl, & prev, & next );
Pprev = (prev? & Prev-> vm_next: & mm-> mmap );
If (* pprev! = Next)
Printk ("insert_vm_struct: tree inconsistent with list \ n ");
}
Vmp-> vm_next = * pprev;
* Pprev = vmp;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service