MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / mark_debt

Method mark_debt

aiscript-arena/src/arena.rs:288–301  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

286 /// collection phase is `Marked` or `Sweeping`, otherwise acts like `Arena::collect_debt`.
287 #[inline]
288 pub fn mark_debt(&mut self) -> Option<MarkedArena<'_, R>> {
289 if matches!(self.context.phase(), Phase::Mark | Phase::Sleep) {
290 unsafe {
291 self.context
292 .do_collection(&self.root, 0.0, Some(EarlyStop::BeforeSweep));
293 }
294 }
295
296 if self.context.phase() == Phase::Mark && !self.context.gray_remaining() {
297 Some(MarkedArena(self))
298 } else {
299 None
300 }
301 }
302
303 /// Run the current garbage collection cycle to completion, stopping once garbage collection
304 /// has restarted in the sleep phase. If the collector is currently in the sleep phase, this

Callers

nothing calls this directly

Calls 4

MarkedArenaClass · 0.85
do_collectionMethod · 0.80
phaseMethod · 0.80
gray_remainingMethod · 0.80

Tested by

no test coverage detected