Function report |
Source Code:mm\zsmalloc.c |
Create Date:2022-07-28 16:27:15 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Allocate a zspage for the given size class
Proto:static struct zspage *alloc_zspage(struct zs_pool *pool, struct size_class *class, gfp_t gfp)
Type:struct zspage
Parameter:
Type | Parameter | Name |
---|---|---|
struct zs_pool * | pool | |
struct size_class * | class | |
gfp_t | gfp |
1069 | zspage = cache_alloc_zspage(pool, gfp) |
1071 | If Not zspage Then Return NULL |
1075 | magic = ZSPAGE_MAGIC |
1076 | migrate_lock_init(zspage) |
1081 | page = alloc_page(gfp) |
1082 | If Not page Then |
1084 | dec_zone_page_state(pages[i], allocated in zsmalloc ) |
1085 | __free_page(pages[i]) |
1087 | cache_free_zspage(pool, zspage) |
1088 | Return NULL |
1095 | create_page_chain(class, zspage, pages) |
1098 | Return zspage |
Name | Describe |
---|---|
zs_malloc | zs_malloc - Allocate block of given size from pool.*@pool: pool to allocate from*@size: size of block to allocate*@gfp: gfp flags when allocating object* On success, handle to the allocated object is returned,* otherwise 0. |
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 |