This commit is contained in:
Brendan Hansknecht 2024-09-17 13:37:11 -07:00
parent ad7be994ce
commit 3e423ce418
No known key found for this signature in database
GPG key ID: 0EA784685083E75B

View file

@ -125,7 +125,7 @@ impl<T> RefcountedResourceHeap<T> {
/// Promotes all live references to constants.
/// Does this my walking all allocations and setting the refcount to zero (constant).
/// It will also end up walking freed elements, but their bytes are uninitialized and don't matter.
/// This is great for calling after an init function where all lived data is guarenteed to live until the server finishes running.
/// This is great for calling after an init function where all lived data is guaranteed to live until the server finishes running.
pub fn promote_all_to_constant(&mut self) {
for i in 0..self.0.elements {
let offset = i * Heap::<Refcounted<T>>::node_size();