Function report |
Source Code:mm\slob.c |
Create Date:2022-07-28 15:36:03 |
| Last Modify:2022-05-20 09:26:42 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:slob_alloc: entry point into the slob allocator.
Proto:static void *slob_alloc(size_t size, gfp_t gfp, int align, int node, int align_offset)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| size_t | size | |
| gfp_t | gfp | |
| int | align | |
| int | node | |
| int | align_offset |
| 310 | If size < All partially free slob pages go on these lists. Then slob_list = free_slob_small |
| 312 | Else if size < SLOB_BREAK2 Then slob_list = free_slob_medium |
| 314 | Else slob_list = free_slob_large |
| 320 | bool page_removed_from_list = false |
| 326 | If node != NUMA_NO_NODE && page_to_nid(sp) != node Then Continue |
| 330 | If SLOB < SLOB_UNITS(size) Then Continue |
| 334 | If Not b Then Continue |
| 343 | If Not page_removed_from_list Then |
| 352 | Break |
| 357 | If Not b Then |
| 358 | b = slob_new_pages(gfp & ~__GFP_ZERO, 0, node) |
| 359 | If Not b Then Return NULL |
| 361 | sp = virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(b) |
| 362 | __SetPageSlab(sp) |
| 365 | SLOB = SLOB_UNITS(PAGE_SIZE) |
| 366 | first free object = b |
| 369 | set_slob_page_free(sp, slob_list) |
| 374 | If Value for the false possibility is greater at compile time(gfp & __GFP_ZERO) Then memset(b, 0, size) |
| 376 | Return b |
| Name | Describe |
|---|---|
| __do_kmalloc_node | End of slob allocator proper. Begin kmem_cache_alloc and kmalloc frontend. |
| slob_alloc_node |
| 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 |