函数逻辑报告 |
Source Code:lib\genalloc.c |
Create Date:2022-07-27 07:54:06 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:gen_pool_alloc_algo_owner - allocate special memory from the pool*@pool: pool to allocate from*@size: number of bytes to allocate from the pool*@algo: algorithm passed from caller*@data: data passed to algorithm*@owner: optionally retrieve the chunk owner
函数原型:unsigned long gen_pool_alloc_algo_owner(struct gen_pool *pool, size_t size, genpool_algo_t algo, void *data, void **owner)
返回类型:unsigned long
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct gen_pool * | pool | |
| size_t | size | |
| genpool_algo_t | algo | |
| void * | data | |
| void ** | owner |
| 279 | addr等于0 |
| 290 | 如果size恒等于0则返回:0 |
| 296 | 如果size大于atomic_long_read( & avail)则继续下一循环 |
| 299 | start_bit等于0 |
| 300 | end_bit等于chunk_size(chunk)右移order位 |
| 301 | retry : |
| 302 | start_bit等于algo(map for allocating memory chunk , end_bit, start_bit, nbits, data, pool, start address of memory chunk ) |
| 307 | 如果remain则 |
| 311 | 转到:retry |
| 314 | addr等于start address of memory chunk 加start_bit左移order位的值 |
| 316 | atomic_long_sub(size, & avail) |
| 319 | 退出 |
| 322 | 返回:addr |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |