Function report |
Source Code:mm\mmap.c |
Create Date:2022-07-28 14:49:00 |
| 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_topdown
Proto:unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info)
Type:unsigned long
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct vm_unmapped_area_info * | info |
| 1965 | length = length + align_mask |
| 1973 | gap_end = high_limit |
| 1976 | high_limit = gap_end - length |
| 1978 | If low_limit > high_limit Then Return -ENOMEM |
| 1983 | gap_start = highest vma end address |
| 1984 | If gap_start <= high_limit Then Go to found_highest |
| 1988 | If RB_EMPTY_ROOT( & mm_rb) Then Return -ENOMEM |
| 1990 | vma = rb_entry(rb_node, structvm_area_struct, vm_rb) |
| 1994 | When (true) cycle |
| 1996 | 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 |
| 1997 | If gap_start <= high_limit && rb_right Then |
| 1998 | right = rb_entry(rb_right, structvm_area_struct, vm_rb) |
| 2007 | check_current : |
| 2009 | gap_end = vm_start_gap(vma) |
| 2012 | If gap_start <= high_limit && gap_end > gap_start && gap_end - gap_start >= length Then Go to found |
| 2017 | If rb_left Then |
| 2018 | left = rb_entry(rb_left, structvm_area_struct, vm_rb) |
| 2028 | When (true) cycle |
| 2035 | 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 |
| 2037 | Go to check_current |
| 2042 | found : |
| 2044 | If gap_end > high_limit Then gap_end = high_limit |
| 2047 | found_highest : |
| 2050 | gap_end -= gap_end - align_offset & align_mask |
| 2054 | Return gap_end |
| 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 |