Function report |
Source Code:mm\slob.c |
Create Date:2022-07-28 15:35:58 |
| Last Modify:2022-05-20 09:26:42 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:slob_page_alloc() - Allocate a slob block within a given slob_page sp.*@sp: Page to look in.*@size: Size of the allocation.*@align: Allocation alignment.*@align_offset: Offset in the allocated block that will be aligned.
Proto:static void *slob_page_alloc(struct page *sp, size_t size, int align, int align_offset, bool *page_removed_from_list)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct page * | sp | |
| size_t | size | |
| int | align | |
| int | align_offset | |
| bool * | page_removed_from_list |
| 241 | delta = 0 , units = SLOB_UNITS(size) |
| 243 | * page_removed_from_list = false |
| 244 | cycle |
| 254 | If align Then |
| 255 | aligned = @a is a power of 2 value ((unsignedlong)cur + align_offset, align) - align_offset |
| 263 | If delta Then |
| 276 | Else first free object = next |
| 278 | Else |
| 281 | Else first free object = cur + units |
| 287 | If Not SLOB Then |
| 288 | clear_slob_page_free(sp) |
| 289 | * page_removed_from_list = true |
| 291 | Return cur |
| 293 | If Returns true if s is the last free block in its page. Then Return NULL |
| Name | Describe |
|---|---|
| slob_alloc | slob_alloc: entry point into the slob allocator. |
| 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 |