macro_rules! pool {
($vis:vis, $name:ident, $ty:ty, $max_capacity:expr_2021, $max_elt_size:expr_2021) => { ... };
($name:ident, $ty:ty, $max_capacity:expr_2021, $max_elt_size:expr_2021) => { ... };
}
Expand description
pool(vis, name, type, capacity, max_elt_size)
Create a static memory pool. Objects are taken from the pool or allocated normally if it is empty, when they are dropped instead of being deallocated they are cleared and inserted into the pool, up to capacity elements no more than max_elt_size may be stored in the pool.