Skip to main content

purge_all

Function purge_all 

Source
pub fn purge_all(force: bool) -> PurgeAllReport
Expand description

Process-wide eager purge from any thread (issue #366), with the C default of a 100 ms owner-acquisition wait: mi_purge_all(force), but with the report kept.

This is the C convenience form and it never reclaims arenas: use purge_all_ex with PurgeFlags::RECLAIM to give the completely free ones back.

force ignores the purge_delay / hole-purge pacing options and lets each claimed sweep run to completion. See purge_all_ex for what the wait bounds (owner acquisition only, never a sweep or its syscalls) and why a partial result – some threads pending – is the normal outcome in a build without the owner-gate feature. The status is PurgeAllReport::complete; a busy (nothing-done) call reports zero theaps_swept. Use purge_all_ex when the status itself is needed.

Goes through mi_purge_all_ex rather than C’s mi_purge_all, which is the same call with the report thrown away.