函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\zsmalloc.c Create Date:2022-07-27 18:02:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:obj_free

函数原型:static void obj_free(struct size_class *class, unsigned long obj)

返回类型:void

参数:

类型参数名称
struct size_class *class
unsigned longobj
1524  obj与等于Head in allocated object should have OBJ_ALLOCATED_TAG* to identify the object was allocated or not.* It's okay to add the status bit in the least bit because* header keeps handle which is 4byte-aligned address so we* have room for two bit at least.的反
1525  bj_to_location - get (, ) from encoded object value*@obj: the encoded object value*@page: page object resides in zspage*@obj_idx: object index
1526  f_offset等于* Size of objects stored in this class. Must be multiple * of ZS_ALIGN.f_objidx按位与PAGE_MASK的反
1527  zspage等于get_zspage(f_page)
1529  vaddr等于kmap_atomic(f_page)
1532  link等于vaddrf_offset
1533  Free object index;* It's valid for non-allocated object等于get_freeobj(zspage)左移OBJ_TAG_BITS
1534  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)
1535  set_freeobj(zspage, f_objidx)
1536  mod_zspage_inuse(zspage, - 1)
1537  ype can be of enum type zs_stat_type or fullness_group
调用者
名称描述
zs_free
migrate_zspage