orx_selfref_col/memory/utilization.rs
1/// Node utilization of the underlying storage of the self referential collection.
2///
3/// The result contains the following bits of information:
4/// * `capacity`: number of positions that is already allocated.
5/// * `num_active_nodes`: number of active nodes holding data.
6/// * `num_closed_nodes`: number of nodes which had been opened and closed afterwards; however, not yet reclaimed.
7///
8/// Note that `num_active_nodes + num_closed_nodes` reflects the length of the underlying pinned vector,
9/// which is less than or equal to the `capacity`.
10#[derive(Debug, PartialEq, Eq, Clone)]
11pub struct Utilization {
12 /// Number of positions that is already allocated.
13 pub capacity: usize,
14 /// Number of active nodes holding data.
15 pub num_active_nodes: usize,
16 /// Number of nodes which had been opened and closed afterwards; however, not yet reclaimed.
17 pub num_closed_nodes: usize,
18}