(&self)
| 192 | /// How many bytes are allocated by all PoolAlloc that are currently owned. |
| 193 | #[cfg(test)] |
| 194 | fn total_bytes_allocated(&self) -> usize { |
| 195 | if let Some(top) = self.top { |
| 196 | { 0..=top } |
| 197 | .map(|i| { self.pools[i].bytes_total() }) |
| 198 | .sum() |
| 199 | } else { |
| 200 | 0 |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | } |
| 205 |