Lines Matching refs:obj_size
104 static inline size_t __idx_to_offset(size_t idx, size_t obj_size)
106 if (__builtin_constant_p(obj_size))
107 BUILD_BUG_ON(obj_size > GENRADIX_NODE_SIZE);
109 BUG_ON(obj_size > GENRADIX_NODE_SIZE);
111 if (!is_power_of_2(obj_size)) {
112 size_t objs_per_page = GENRADIX_NODE_SIZE / obj_size;
115 (idx % objs_per_page) * obj_size;
117 return idx * obj_size;
212 size_t obj_size)
214 if (iter->offset + obj_size < iter->offset) {
220 iter->offset += obj_size;
222 if (!is_power_of_2(obj_size) &&
223 (iter->offset & (GENRADIX_NODE_SIZE - 1)) + obj_size > GENRADIX_NODE_SIZE)
233 size_t obj_size)
242 iter->offset -= GENRADIX_NODE_SIZE % obj_size;
244 iter->offset -= obj_size;