Function report |
Source Code:mm\mmap.c |
Create Date:2022-07-28 14:48:52 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:unmapped_area
Proto:unsigned long unmapped_area(struct vm_unmapped_area_info *info)
Type:unsigned long
Parameter:
Type | Parameter | Name |
---|---|---|
struct vm_unmapped_area_info * | info |
1870 | length = length + align_mask |
1875 | If high_limit < length Then Return -ENOMEM |
1877 | high_limit = high_limit - length |
1879 | If low_limit > high_limit Then Return -ENOMEM |
1884 | If RB_EMPTY_ROOT( & mm_rb) Then Go to check_highest |
1886 | vma = rb_entry(rb_node, structvm_area_struct, vm_rb) |
1890 | When (true) cycle |
1892 | gap_end = vm_start_gap(vma) |
1894 | left = rb_entry(rb_left, structvm_area_struct, vm_rb) |
1903 | gap_start = If linked list of VM areas per task, sorted by address Then vm_end_gap(linked list of VM areas per task, sorted by address ) Else 0 |
1904 | check_current : |
1906 | If gap_start > high_limit Then Return -ENOMEM |
1908 | If gap_end >= low_limit && gap_end > gap_start && gap_end - gap_start >= length Then Go to found |
1913 | If rb_right Then |
1914 | right = rb_entry(rb_right, structvm_area_struct, vm_rb) |
1924 | When (true) cycle |
1926 | If Not rb_parent(prev) Then Go to check_highest |
1932 | gap_end = vm_start_gap(vma) |
1933 | Go to check_current |
1938 | check_highest : |
1940 | gap_start = highest vma end address |
1942 | If gap_start > high_limit Then Return -ENOMEM |
1945 | found : |
1951 | gap_start += align_offset - gap_start & align_mask |
1953 | VM_BUG_ON(gap_start + length > high_limit) |
1955 | Return gap_start |
Name | Describe |
---|---|
vm_unmapped_area | Search for an unmapped address range |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |