Function report |
Source Code:mm\slub.c |
Create Date:2022-07-28 15:48:43 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:This function progressively scans the array with free objects (with* a limited look ahead) and extract objects belonging to the same* page. It builds a detached freelist directly within the given* page/objects. This can happen without any need for
Proto:static inline int build_detached_freelist(struct kmem_cache *s, size_t size, void **p, struct detached_freelist *df)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct kmem_cache * | s | |
size_t | size | |
void ** | p | |
struct detached_freelist * | df |
3050 | first_skipped_index = 0 |
3051 | lookahead = 3 |
3056 | page = NULL |
3058 | Do |
3063 | If Not object Then Return 0 |
3066 | page = virt_to_head_page(object) |
3067 | If Not s Then |
3069 | If Value for the false possibility is greater at compile time(!PageSlab(page)) Then |
3070 | BUG_ON(!PageCompound(page)) |
3071 | kfree_hook(object) |
3072 | __free_pages(page, compound_order(page)) |
3074 | Return size |
3078 | Else |
3079 | s = cache_from_obj(s, object) |
3084 | set_freepointer(s, object, NULL) |
3088 | cnt = 1 |
3092 | If Not object Then Continue |
3096 | If page == virt_to_head_page(object) Then |
3107 | If Not --lookahead Then Break |
3110 | If Not first_skipped_index Then first_skipped_index = size + 1 |
3114 | Return first_skipped_index |
Name | Describe |
---|---|
kmem_cache_free_bulk | Note that interrupts must be enabled when calling this function. |
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 |