Function report |
Source Code:mm\zsmalloc.c |
Create Date:2022-07-28 16:27:39 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:obj_malloc
Proto:static unsigned long obj_malloc(struct size_class *class, struct zspage *zspage, unsigned long handle)
Type:unsigned long
Parameter:
Type | Parameter | Name |
---|---|---|
struct size_class * | class | |
struct zspage * | zspage | |
unsigned long | handle |
1419 | obj = get_freeobj(zspage) |
1422 | nr_page = offset >> PAGE_SHIFT determines the page size |
1424 | m_page = get_first_page(zspage) |
1429 | vaddr = kmap_atomic(m_page) |
1432 | If Value is more likely to compile time(!PageHugeObject(m_page)) Then Handle of allocated object. = handle |
1435 | Else Our offset within mapping. = handle |
1439 | Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(vaddr) |
1440 | mod_zspage_inuse(zspage, 1) |
1443 |
obj = location_to_obj - get obj value encoded from ( |
1445 | Return obj |
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. |
migrate_zspage |
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 |