函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\asm-generic\getorder.h Create Date:2022-07-27 06:38:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:get_order - Determine the allocation order of a memory size*@size: The size for which to get the order* Determine the allocation order of a particular sized block of memory

函数原型:static inline __attribute_const__ int get_order(unsigned long size)

返回类型:int

参数:

类型参数名称
unsigned longsize
31  如果__builtin_constant_p(size)则
32  如果非size则返回:BITS_PER_LONGPAGE_SHIFT determines the page size
35  如果size小于1UL左移PAGE_SHIFT determines the page size 位则返回:0
38  返回:log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the ((size) - 1)减PAGE_SHIFT determines the page size 加1
41  size自减
42  size右移等于PAGE_SHIFT determines the page size
44  返回:ls - find last set bit in word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffs, but returns the position of the most significant set bit.* fls(value) returns 0 if value is 0 or the position of the last
调用者
名称描述
kvmclock_init_mem
gart_alloc_coherentallocate and map a coherent mapping
init_amd_gattPrivate Northbridge GATT initialization in case we cannot use the* AGP driver for some reason.
gart_iommu_init
dma_free_attrs
__dma_direct_alloc_pages
dma_direct_alloc_pages
dma_direct_free_pages
dma_alloc_contiguousdma_alloc_contiguous() - allocate contiguous pages*@dev: Pointer to device for which the allocation is performed
dma_free_contiguousdma_free_contiguous() - release allocated pages*@dev: Pointer to device for which the pages were allocated
__dma_alloc_from_coherent
dma_virt_alloc
dma_virt_free
swiotlb_late_init_with_default_sizeSystems with larger DMA zones (those that don't support ISA) can* initialize the swiotlb later using the slab allocator if needed.* This should be just like above, but with some error catching.
swiotlb_late_init_with_tbl
swiotlb_exit
dma_common_contiguous_remapRemaps an allocated contiguous region into another vm_area.* Cannot be used in non-sleeping contexts
kimage_alloc_init
kimage_file_alloc_init
do_mmap_privateset up a private mapping or an anonymous shared mapping
vb_alloc
vb_free
alloc_pages_exactalloc_pages_exact - allocate an exact number physically-contiguous pages.*@size: the number of bytes to allocate*@gfp_mask: GFP flags for the allocation, must not contain __GFP_COMP* This function is similar to alloc_pages(), except that it allocates the
alloc_pages_exact_nidalloc_pages_exact_nid - allocate an exact number of physically-contiguous* pages on a node
alloc_large_system_hashallocate a large system hash table from bootmem* - it is assumed that the hash table must contain an exact power-of-2* quantity of entries* - limit is the number of hash buckets, not the total allocation size
vmemmap_alloc_block
__do_kmalloc_nodeEnd of slob allocator proper. Begin kmem_cache_alloc and kmalloc frontend.
slob_alloc_node
__kmem_cache_free
slab_orderCalculate the order of allocation given an slab object size.* The order of allocation has significant impact on performance and other* system components. Generally order 0 allocations should be preferred since
calculate_sizesalculate_sizes() determines the order and the distribution of data within* a slab object.
kmem_cache_open
kmalloc_large_node
__kmalloc_node
__kmalloc_node_track_caller
try_charge
param_set_bufsize
ima_alloc_pagesma_alloc_pages() - Allocate contiguous pages
ima_free_pagesma_free_pages() - Free pages allocated by ima_alloc_pages().*@ptr: Pointer to allocated pages.*@size: Size of allocated buffer.
io_mem_alloc
ring_pages
ramfs_nommu_expand_for_mappingadd a contiguous set of pages into a ramfs inode when it's truncated from* size 0 on the assumption that it's going to be used for an mmap of shared* memory
dma_free_contiguous
kmalloc_large