Free a slab page, returning it to the pool.
(&mut self, id: SlabId)
| 114 | |
| 115 | /// Free a slab page, returning it to the pool. |
| 116 | pub fn free(&mut self, id: SlabId) { |
| 117 | assert_eq!(id.core_id, self.core_id, "slab ID core mismatch"); |
| 118 | self.free_list.push(id.page_index); |
| 119 | } |
| 120 | |
| 121 | /// Number of available (free) pages. |
| 122 | pub fn available(&self) -> usize { |