Function report |
Source Code:lib\genalloc.c |
Create Date:2022-07-28 06:56:53 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:gen_pool_add_owner- add a new chunk of special memory to the pool*@pool: pool to add new memory chunk to*@virt: virtual starting address of memory chunk to add to pool*@phys: physical starting address of memory chunk to add to pool*@size: size in bytes of
Proto:int gen_pool_add_owner(struct gen_pool *pool, unsigned long virt, phys_addr_t phys, size_t size, int nid, void *owner)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct gen_pool * | pool | |
unsigned long | virt | |
phys_addr_t | phys | |
size_t | size | |
int | nid | |
void * | owner |
186 | nbits = size >> minimum allocation order |
187 | nbytes = sizeof(structgen_pool_chunk) + BITS_TO_LONGS(nbits) * sizeof(long) |
190 | chunk = vzalloc_node(nbytes, nid) |
191 | If Value for the false possibility is greater at compile time(chunk == NULL) Then Return -ENOMEM |
196 | d address of memory chunk (inclusive) = virt + size - 1 |
198 | atomic_long_set( & avail, size) |
202 | spin_unlock( & lock) |
204 | Return 0 |
Name | Describe |
---|---|
gen_pool_add_virt |
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 |