MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / mark_external_allocation

Method mark_external_allocation

aiscript-arena/src/metrics.rs:181–186  ·  view source on GitHub ↗
(&self, bytes: usize)

Source from the content-addressed store, hash-verified

179 /// debt.
180 #[inline]
181 pub fn mark_external_allocation(&self, bytes: usize) {
182 cell_update(&self.0.total_external_bytes, |b| b.saturating_add(bytes));
183 cell_update(&self.0.allocated_external_bytes, |b| {
184 b.saturating_add(bytes)
185 });
186 }
187
188 /// Call to mark that bytes which have been marked as allocated with
189 /// `Metrics::mark_external_allocation` have been since deallocated.

Callers 6

addMethod · 0.80
allocateMethod · 0.80
allocate_zeroedMethod · 0.80
growMethod · 0.80
grow_zeroedMethod · 0.80
from_bufferMethod · 0.80

Calls 1

cell_updateFunction · 0.85

Tested by

no test coverage detected