Function report |
Source Code:mm\slab.c |
Create Date:2022-07-28 15:43:12 |
Last Modify:2022-05-23 17:02:55 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Calculate the number of objects and left-over bytes for a given buffer size.
Proto:static unsigned int cache_estimate(unsigned long gfporder, size_t buffer_size, slab_flags_t flags, size_t *left_over)
Type:unsigned int
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned long | gfporder | |
size_t | buffer_size | |
slab_flags_t | flags | |
size_t * | left_over |
471 | If flags & (CFLGS_OBJFREELIST_SLAB | CFLGS_OFF_SLAB) Then |
472 | num = slab_size / buffer_size |
473 | left_over = slab_size % buffer_size |
474 | Else |
475 | num = slab_size / (buffer_size + sizeof(freelist_idx_t)) |
476 | left_over = slab_size % (buffer_size + sizeof(freelist_idx_t)) |
480 | Return num |
Name | Describe |
---|---|
calculate_slab_order | 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. |
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 |