Free a slot by index.
(&mut self, slot_idx: u32)
| 80 | |
| 81 | /// Free a slot by index. |
| 82 | fn free(&mut self, slot_idx: u32) { |
| 83 | debug_assert!((slot_idx as usize) < self.total_slots); |
| 84 | self.free_list.push(slot_idx); |
| 85 | self.occupied -= 1; |
| 86 | } |
| 87 | |
| 88 | /// Read data from a slot. |
| 89 | fn get(&self, slot_idx: u32, len: usize) -> &[u8] { |