| Function report | 
| Source Code: mm\zsmalloc.c | Create Date:2022-07-28 16:28:12 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:__zs_compact
Proto:static void __zs_compact(struct zs_pool *pool, struct size_class *class)
Type:void
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct zs_pool * | pool | |
| struct size_class * | class | 
| 2269 | struct zspage * dst_zspage = NULL | 
| 2272 | When src_zspage = isolate_zspage(class, true) cycle | 
| 2274 | If Not Based on the number of unused allocated objects calculate* and return the number of pages that we can free. Then Break | 
| 2280 | When dst_zspage = isolate_zspage(class, false) cycle | 
| 2281 | Destination page for migration which should be a first page * of zspage. = get_first_page(dst_zspage) | 
| 2286 | If Not migrate_zspage(pool, class, & cc) Then Break | 
| 2293 | If (dst_zspage == NULL) Then Break | 
| 2298 | free_zspage(pool, class, src_zspage) | 
| 2301 | spin_unlock( & lock) | 
| 2302 | cond_resched() | 
| 2306 | If src_zspage Then putback_zspage - add @zspage into right class's fullness list*@class: destination class*@zspage: target page* Return @zspage's fullness_group | 
| 2309 | spin_unlock( & lock) | 
| Name | Describe | 
|---|---|
| zs_compact | 
| 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 |