| Function report | 
| Source Code: fs\ramfs\file-nommu.c | Create Date:2022-07-28 20:35:08 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:ramfs_nommu_get_unmapped_area
Proto:static unsigned long ramfs_nommu_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags)
Type:unsigned long
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct file * | file | |
| unsigned long | addr | |
| unsigned long | len | |
| unsigned long | pgoff | |
| unsigned long | flags | 
| 206 | inode = file_inode(file) | 
| 211 | lpages = len + PAGE_SIZE - 1 >> PAGE_SHIFT determines the page size | 
| 215 | maxpages = isize + PAGE_SIZE - 1 >> PAGE_SHIFT determines the page size | 
| 223 | pages = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). | 
| 228 | If nr != lpages Then Go to out_free_pages | 
| 234 | page++ | 
| 237 | Go to out_free_pages | 
| 240 | ret = page_address(pages[0]) | 
| 242 | out_free_pages : | 
| 244 | When loop > 0 cycle Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page. | 
| 246 | out_free : | 
| 248 | out : | 
| 249 | Return ret | 
| 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 |