函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\zsmalloc.c Create Date:2022-07-27 18:02:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__zs_map_object

函数原型:static void *__zs_map_object(struct mapping_area *area, struct page *pages[2], int off, int size)

返回类型:void

参数:

类型参数名称
struct mapping_area *area
struct page *pages
intoff
intsize
1181  buf等于 copy buffer for objects that span pages
1184  These routines enable/disable the pagefault handler. If disabled, it will* not take any locks and go straight to the fixup table.* User access methods will not sleep when called from a pagefault_disabled()* environment.
1187  如果 mapping mode 恒等于ZS_MM_WO则转到:out
1190  sizes[0]等于PAGE_SIZEoff
1191  sizes[1]等于sizesizes[0]
1194  addr等于kmap_atomic(pages[0])
1195  memcpy(buf, addr + off, sizes[0])
1196  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(addr)
1197  addr等于kmap_atomic(pages[1])
1198  memcpy(buf + sizes[0], addr, sizes[1])
1199  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(addr)
1200  out :
1201  返回: copy buffer for objects that span pages
调用者
名称描述
zs_map_objectzs_map_object - get address of allocated object from handle.*@pool: pool from which the object was allocated*@handle: handle returned from zs_malloc*@mm: maping mode to use* Before using an object allocated from zs_malloc, it must be mapped using