Function report |
Source Code:mm\memblock.c |
Create Date:2022-07-28 15:10:39 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:memblock_alloc_range_nid - allocate boot memory block*@size: size of memory block to be allocated in bytes*@align: alignment of the region and block's size*@start: the lower bound of the memory region to allocate (phys address)*@end: the upper bound of
Proto:static phys_addr_t __init memblock_alloc_range_nid(phys_addr_t size, phys_addr_t align, phys_addr_t start, phys_addr_t end, int nid, bool exact_nid)
Type:phys_addr_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| phys_addr_t | size | |
| phys_addr_t | align | |
| phys_addr_t | start | |
| phys_addr_t | end | |
| int | nid | |
| bool | exact_nid |
| 1345 | flags = choose_memblock_flags() |
| 1348 | If WARN_ONCE(nid == MAX_NUMNODES, "Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n") Then nid = NUMA_NO_NODE |
| 1351 | If Not align Then |
| 1353 | dump_stack() |
| 1354 | align = SMP_CACHE_BYTES |
| 1357 | again : |
| 1360 | If found && Not memblock_reserve(found, size) Then Go to done |
| 1363 | If nid != NUMA_NO_NODE && Not exact_nid Then |
| 1364 | found = memblock_find_in_range_node(size, align, start, end, NUMA_NO_NODE, flags) |
| 1367 | If found && Not memblock_reserve(found, size) Then Go to done |
| 1371 | If flags & mirrored region Then |
| 1372 | flags &= ~mirrored region |
| 1375 | Go to again |
| 1378 | Return 0 |
| 1380 | done : |
| 1382 | If end != MEMBLOCK_ALLOC_KASAN Then kmemleak_alloc_phys(found, size, 0, 0) |
| 1391 | Return found |
| Name | Describe |
|---|---|
| memblock_phys_alloc_range | memblock_phys_alloc_range - allocate a memory block inside specified range*@size: size of memory block to be allocated in bytes*@align: alignment of the region and block's size*@start: the lower bound of the memory region to allocate (physical |
| memblock_phys_alloc_try_nid | memblock_phys_alloc_try_nid - allocate a memory block from specified MUMA node*@size: size of memory block to be allocated in bytes*@align: alignment of the region and block's size*@nid: nid of the free area to find, %NUMA_NO_NODE for any node |
| memblock_alloc_internal | memblock_alloc_internal - allocate boot memory block*@size: size of memory block to be allocated in bytes*@align: alignment of the region and block's size*@min_addr: the lower bound of the memory region to allocate (phys address)*@max_addr: the upper |
| 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 |