函数逻辑报告 |
Source Code:lib\test_meminit.c |
Create Date:2022-07-27 07:35:13 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Check that the data written to an RCU-allocated object survives* reallocation.
函数原型:static int __init do_kmem_cache_rcu_persistent(int size, int *total_failures)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
int | size | |
int * | total_failures |
276 | maxiter等于1024 |
277 | bool fail = false |
281 | buf等于kmem_cache_alloc(c, GFP_KERNEL) |
283 | fill_with_garbage(buf, size) |
284 | buf_contents等于kmalloc(size, GFP_KERNEL) |
285 | 如果非buf_contents则转到:out |
287 | used_objects等于分配数组内存 |
288 | 如果非used_objects则 |
289 | kfree(buf_contents) |
290 | 转到:out |
292 | 内存复制(buf_contents, buf, size) |
293 | kmem_cache_free(c, buf) |
299 | buf等于kmem_cache_alloc(c, GFP_KERNEL) |
300 | used_objects[iter]等于buf |
302 | fail等于memcmp(buf_contents, buf, size) |
303 | 以i小于等于iter循环kmem_cache_free(c, used_objects[i]) |
305 | 转到:free_out |
309 | free_out : |
310 | 删除高速缓存区 |
311 | kfree(buf_contents) |
312 | kfree(used_objects) |
313 | out : |
314 | total_failures加等于fail |
315 | 返回:1 |
名称 | 描述 |
---|---|
test_rcu_persistent | Test the behavior of SLAB_TYPESAFE_BY_RCU caches of different sizes. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |