Lines Matching refs:offset
32 /* We use an array of int to store the references to a given offset in the swap
33 1 GiB swap means 512KiB size array: offset are the index */
70 fprintf(stderr, "Error allocating proportional swap offset array.\n");
86 void pm_memusage_pswap_add_offset(pm_memusage_t *mu, unsigned int offset) {
92 if (offset >= mu->p_swap->array_size) {
93 fprintf(stderr, "SWAP offset %d is out of swap bounds.\n", offset);
97 if (mu->p_swap->offset_array[offset] == USHRT_MAX) {
98 fprintf(stderr, "SWAP offset %d ref. count if overflowing ushort type.\n", offset);
100 mu->p_swap->offset_array[offset]++;
105 soff->offset = offset;
120 su->proportional += pagesize / mu->p_swap->offset_array[elem->offset];
121 su->unique += mu->p_swap->offset_array[elem->offset] == 1 ? pagesize : 0;