函数逻辑报告 |
Source Code:mm\zsmalloc.c |
Create Date:2022-07-27 18:02:39 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:zs_malloc - Allocate block of given size from pool.*@pool: pool to allocate from*@size: size of block to allocate*@gfp: gfp flags when allocating object* On success, handle to the allocated object is returned,* otherwise 0.
函数原型:unsigned long zs_malloc(struct zs_pool *pool, size_t size, gfp_t gfp)
返回类型:unsigned long
参数:
类型 | 参数 | 名称 |
---|---|---|
struct zs_pool * | pool | |
size_t | size | |
gfp_t | gfp |
1466 | 如果此条件成立可能性小(为编译器优化)(!size || size > ach chunk includes extra space to keep handle )则返回:0 |
1469 | handle等于cache_alloc_handle(pool, gfp) |
1470 | 如果非handle则返回:0 |
1474 | size加等于ZS_HANDLE_SIZE |
1477 | 加自旋锁 |
1478 | zspage等于find_get_zspage(class) |
1479 | 如果此条件成立可能性大(为编译器优化)(zspage)则 |
1489 | 自旋锁解锁 |
1492 | 如果非zspage则 |
1493 | cache_free_handle(pool, handle) |
1494 | 返回:0 |
1497 | 加自旋锁 |
1498 | obj等于obj_malloc(class, zspage, handle) |
1501 | set_zspage_mapping(zspage, index, newfg) |
1502 | record_obj(handle, obj) |
1503 | atomic_long_add( Number of PAGE_SIZE sized pages to combine to form a 'zspage' , & pages_allocated) |
1508 | SetZsPageMovable(pool, zspage) |
1509 | 自旋锁解锁 |
1511 | 返回:handle |
名称 | 描述 |
---|---|
zs_zpool_malloc |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |