Function report | 
Source Code:lib\lru_cache.c | 
Create Date:2022-07-28 07:16:45 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:lc_create - prepares to track objects in an active set*@name: descriptive name only used in lc_seq_printf_stats and lc_seq_dump_details*@max_pending_changes: maximum changes to accumulate until a transaction is required*@e_count: number of elements
Proto:struct lru_cache *lc_create(const char *name, struct kmem_cache *cache, unsigned max_pending_changes, unsigned e_count, size_t e_size, size_t e_off)
Type:struct lru_cache
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| const char * | name | |
| struct kmem_cache * | cache | |
| unsigned | max_pending_changes | |
| unsigned | e_count | |
| size_t | e_size | |
| size_t | e_off | 
| 91 | struct hlist_head * slot = NULL | 
| 92 | struct lc_element * * element = NULL | 
| 98 | WARN_ON(cache_obj_size < e_size) | 
| 99 | If cache_obj_size < e_size Then Return NULL | 
| 107 | slot = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). | 
| 110 | element = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). | 
| 114 | lc = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). | 
| 127 | allow to accumulate a few (index:label) changes, * but no more than max_pending_changes = max_pending_changes | 
| 129 | lc_element = element | 
| 130 | nr_elements there = slot | 
| 134 | p = kmem_cache_alloc(cache, GFP_KERNEL) | 
| 135 | If Not p Then Break | 
| 154 | out_fail : | 
| 157 | Return NULL | 
| 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  |