Function report |
Source Code:mm\slub.c |
Create Date:2022-07-28 15:49:07 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:alculate_sizes() determines the order and the distribution of data within* a slab object.
Proto:static int calculate_sizes(struct kmem_cache *s, int forced_order)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct kmem_cache * | s | |
int | forced_order |
3504 | size = @a is a power of 2 value (size, size of * ) |
3532 | Offset to metadata = size |
3534 | If flags & (Defer freeing slabs to RCU | DEBUG: Poison objects ) || ctor Then |
3544 | Free pointer offset = size |
3545 | size += size of * |
3557 | kasan_cache_create(s, & size, & Used for retrieving partial slabs, etc. ) |
3580 | size = @a is a power of 2 value (size, Alignment ) |
3582 | If forced_order >= 0 Then order = forced_order |
3584 | Else order = calculate_order(size) |
3587 | If order < 0 Then Return 0 |
3590 | gfp flags to use on each alloc = 0 |
3591 | If order Then gfp flags to use on each alloc |= __GFP_COMP |
3594 | If Used for retrieving partial slabs, etc. & Use GFP_DMA memory Then gfp flags to use on each alloc |= GFP_DMA |
3597 | If Used for retrieving partial slabs, etc. & Use GFP_DMA32 memory Then gfp flags to use on each alloc |= GFP_DMA32 |
3607 | min = oo_make(get_order - Determine the allocation order of a memory size*@size: The size for which to get the order* Determine the allocation order of a particular sized block of memory, size) |
3608 | If oo_objects(oo) > oo_objects(Allocation and freeing of slabs ) Then Allocation and freeing of slabs = oo |
3611 | Return Not Not oo_objects(oo) |
Name | Describe |
---|---|
kmem_cache_open |
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 |