函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\nommu.c Create Date:2022-07-27 16:04:02
Last Modify:2020-03-17 21:26:27 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:shrink a VMA by removing the specified chunk from either the beginning or* the end

函数原型:static int shrink_vma(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long from, unsigned long to)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
struct vm_area_struct *vma
unsigned longfrom
unsigned longto
1455  delete a VMA from its owning mm_struct and address space
1456  如果from大于Our start address within vm_mm. The first byte after our end addresswithin vm_mm. 等于from
1458  否则Our start address within vm_mm. 等于to
1460  add a VMA into a process's mm_struct in the appropriate place in the list* and tree and add to the address space's page tree also if not an anonymous* page* - should be called with mm->mmap_sem held writelocked
1463  region等于vm_region
1464  BUG_ON(gion usage count (access under nommu_region_sem) != 1)
1466  lock for writing
1467  delete a region from the global tree
1468  如果from大于start address of region
1469  to等于gion allocated to here
1470  gion allocated to here 等于gion initialised to here 等于from
1471  否则
1472  start address of region 等于to
1474  add a region into the global tree
1475  lease a write lock
1477  a contiguous series of pages
1478  返回:0
调用者
名称描述
do_munmaplease a mapping* - under NOMMU conditions the chunk to be unmapped must be backed by a single* VMA, though it need not cover the whole VMA