Lines Matching refs:idx
18 fn is_allocated(&self, idx: usize) -> bool; in is_allocated()
19 fn set_bit(&self, idx: usize); in set_bit()
20 fn clear_bit(&self, idx: usize); in clear_bit()
46 for idx in 0..relevant_bits { in initialize()
47 self.clear_bit(idx); in initialize()
72 let idx: usize = base_idx * 64 + first_free; in first_fit() localVariable
73 let offset = idx * layout.size(); in first_fit()
86 return Some((idx, addr)); in first_fit()
95 fn is_allocated(&self, idx: usize) -> bool { in is_allocated()
96 let base_idx = idx / 64; in is_allocated()
97 let bit_idx = idx % 64; in is_allocated()
103 fn set_bit(&self, idx: usize) { in set_bit()
104 let base_idx = idx / 64; in set_bit()
105 let bit_idx = idx % 64; in set_bit()
111 fn clear_bit(&self, idx: usize) { in clear_bit()
112 let base_idx = idx / 64; in clear_bit()
113 let bit_idx = idx % 64; in clear_bit()
139 for (idx, bitmap) in self.iter().enumerate() { in all_free()
140 let checking_bit_range = (idx * 64, (idx + 1) * 64); in all_free()
220 Some((idx, addr)) => { in allocate()
221 self.bitfield().set_bit(idx); in allocate()
248 let idx = page_offset / layout.size(); in deallocate() localVariable
250 self.bitfield().is_allocated(idx), in deallocate()
255 self.bitfield().clear_bit(idx); in deallocate()