Lines Matching refs:mu
40 void pm_memusage_zero(pm_memusage_t *mu) { in pm_memusage_zero() argument
41 mu->vss = mu->rss = mu->pss = mu->uss = mu->swap = 0; in pm_memusage_zero()
42 mu->p_swap = NULL; in pm_memusage_zero()
43 SIMPLEQ_INIT(&mu->swap_offset_list); in pm_memusage_zero()
46 void pm_memusage_pswap_init_handle(pm_memusage_t *mu, pm_proportional_swap_t *p_swap) { in pm_memusage_pswap_init_handle() argument
47 mu->p_swap = p_swap; in pm_memusage_pswap_init_handle()
86 void pm_memusage_pswap_add_offset(pm_memusage_t *mu, unsigned int offset) { in pm_memusage_pswap_add_offset() argument
89 if (mu->p_swap == NULL) in pm_memusage_pswap_add_offset()
92 if (offset > mu->p_swap->array_size) { in pm_memusage_pswap_add_offset()
96 if (mu->p_swap->offset_array[offset] == USHRT_MAX) { in pm_memusage_pswap_add_offset()
99 mu->p_swap->offset_array[offset]++; in pm_memusage_pswap_add_offset()
106 SIMPLEQ_INSERT_TAIL(&mu->swap_offset_list, soff, simpleqe); in pm_memusage_pswap_add_offset()
110 void pm_memusage_pswap_get_usage(pm_memusage_t *mu, pm_swapusage_t *su) { in pm_memusage_pswap_get_usage() argument
119 SIMPLEQ_FOREACH(elem, &mu->swap_offset_list, simpleqe) { in pm_memusage_pswap_get_usage()
120 su->proportional += pagesize / mu->p_swap->offset_array[elem->offset]; in pm_memusage_pswap_get_usage()
121 su->unique += mu->p_swap->offset_array[elem->offset] == 1 ? pagesize : 0; in pm_memusage_pswap_get_usage()
125 void pm_memusage_pswap_free(pm_memusage_t *mu) { in pm_memusage_pswap_free() argument
126 pm_swap_offset_t *elem = SIMPLEQ_FIRST(&mu->swap_offset_list); in pm_memusage_pswap_free()
128 SIMPLEQ_REMOVE_HEAD(&mu->swap_offset_list, simpleqe); in pm_memusage_pswap_free()
130 elem = SIMPLEQ_FIRST(&mu->swap_offset_list); in pm_memusage_pswap_free()