函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Initialize a newly allocated zspage

函数原型:static void init_zspage(struct size_class *class, struct zspage *zspage)

返回类型:void

参数:

类型参数名称
struct size_class *class
struct zspage *zspage
985  freeobj等于1
986  off等于0
987  page等于get_first_page(zspage)
989 page循环
994  set_first_obj_offset(page, off)
996  vaddr等于kmap_atomic(page)
997  link等于vaddrofflink的长度
1009  next_page等于get_next_page(page)
1010  如果next_page
1012  否则
1019  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)
1020  page等于next_page
1021  off取模等于PAGE_SIZE
1024  set_freeobj(zspage, 0)
调用者
名称描述
alloc_zspageAllocate a zspage for the given size class