Function report |
Source Code:mm\slab.c |
Create Date:2022-07-28 15:44:11 |
| Last Modify:2022-05-23 17:02:55 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:alculate_slab_order - calculate size (page order) of slabs*@cachep: pointer to the cache that is being created*@size: size of objects to be created in this cache.*@flags: slab allocation flags* Also calculates the number of objects per slab.
Proto:static size_t calculate_slab_order(struct kmem_cache *cachep, size_t size, slab_flags_t flags)
Type:size_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct kmem_cache * | cachep | |
| size_t | size | |
| slab_flags_t | flags |
| 1705 | left_over = 0 |
| 1713 | If Not num Then Continue |
| 1717 | If num > SLAB_OBJ_MAX_NUM Then Break |
| 1720 | If flags & CFLGS_OFF_SLAB Then |
| 1724 | freelist_size = num * sizeof(freelist_idx_t) |
| 1725 | freelist_cache = kmalloc_slab(freelist_size, 0u) |
| 1726 | If Not freelist_cache Then Continue |
| 1733 | If OFF_SLAB(freelist_cache) Then Continue |
| 1737 | If The size of an object including metadata > The size of an object including metadata / 2 Then Continue |
| 1751 | If flags & Objects are reclaimable Then Break |
| 1758 | If gfporder >= slab_max_order Then Break |
| 1767 | Return left_over |
| Name | Describe |
|---|---|
| set_objfreelist_slab_cache | |
| set_off_slab_cache | |
| set_on_slab_cache |
| 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 |