Function report |
Source Code:mm\slub.c |
Create Date:2022-07-28 15:48:25 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Inlined fastpath so that allocation functions (kmalloc, kmem_cache_alloc)* have the fastpath folded into their functions. So no function call* overhead for requests that can be satisfied on the fastpath.
Proto:static __always_inline void *slab_alloc_node(struct kmem_cache *s, gfp_t gfpflags, int node, unsigned long addr)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct kmem_cache * | s | |
gfp_t | gfpflags | |
int | node | |
unsigned long | addr |
2683 | s = slab_pre_alloc_hook(s, gfpflags) |
2684 | If Not s Then Return NULL |
2686 | redo : |
2697 | Do |
2698 | tid = Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.( Globally unique transaction id ) |
2699 | c = raw_cpu_ptr(cpu_slab) |
2725 | Else |
2726 | next_object = get_freepointer_safe(s, object) |
2747 | note_cmpxchg_failure("slab_alloc", s, tid) |
2748 | Go to redo |
2750 | prefetch_freepointer(s, next_object) |
2751 | stat(s, Allocation from cpu slab ) |
2756 | If Value for the false possibility is greater at compile time(slab_want_init_on_alloc(gfpflags, s)) && object Then memset(object, 0, The size of an object without metadata ) |
2759 | slab_post_alloc_hook(s, gfpflags, 1, & object) |
2761 | Return object |
Name | Describe |
---|---|
slab_alloc | |
kmem_cache_alloc_node | |
__kmalloc_node | |
__kmalloc_node_track_caller | |
kmem_cache_alloc_node | kmem_cache_alloc_node - Allocate an object on the specified node*@cachep: The cache to allocate from.*@flags: See kmalloc().*@nodeid: node number of the target node.* Identical to kmem_cache_alloc but it will allocate memory on the given |
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 |