Function report |
Source Code:mm\zsmalloc.c |
Create Date:2022-07-28 16:27:30 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:zs_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
Proto:void *zs_map_object(struct zs_pool *pool, unsigned long handle, enum zs_mapmode mm)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct zs_pool * | pool | |
unsigned long | handle | |
enum zs_mapmode | mm |
1311 | BUG_ON(in_interrupt()) |
1316 | obj = handle_to_obj(handle) |
1318 | zspage = get_zspage(page) |
1321 | migrate_read_lock(zspage) |
1323 | get_zspage_mapping(zspage, & class_idx, & fg) |
1324 | class = size_class[class_idx] |
1325 | off = * Size of objects stored in this class. Must be multiple * of ZS_ALIGN. * obj_idx & ~PAGE_MASK |
1327 | area = Must be an lvalue. Since @var must be a simple identifier,* we force a syntax error here if it isn't.(per-cpu VM mapping areas for zspage accesses that cross page boundaries ) |
1328 | mapping mode = mm |
1332 | ret = address of kmap_atomic()'ed pages + off |
1333 | Go to out |
1338 | pages[1] = get_next_page(page) |
1341 | ret = __zs_map_object(area, pages, off, * Size of objects stored in this class. Must be multiple * of ZS_ALIGN.) |
1342 | out : |
1343 | If Value is more likely to compile time(!PageHugeObject(page)) Then ret += ZS_HANDLE_SIZE |
1346 | Return ret |
Name | Describe |
---|---|
zs_zpool_map |
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 |