1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! Purge, reset, and decay operations on the retained pools.
/// Purges the global segment pool for a specific backend, releasing all retained/cached segments back to the OS.
/// Purges the global segment pool, releasing all retained/cached segments back to the OS.
/// Asks the OS to drop the physical backing of every retained standard free
/// segment for a specific backend without removing them from the cache.
///
/// Use this as a lighter-weight RSS-reduction knob than `purge`: the
/// standard segment cache stays warm so subsequent small allocations skip the
/// OS mapping syscall, while the resident memory footprint of idle segments
/// drops to the kernel's demand-fault baseline. The separate huge-allocation
/// cache is not reset by this operation.
/// Asks the OS to drop the physical backing of every retained standard free
/// segment without removing them from the cache.
///
/// The separate huge-allocation cache is not reset; use [`purge`] when both
/// cache families must be released.
/// Purges the global segment pool while keeping `warm_threshold` committed
/// segments ready for immediate reuse.
///
/// Unlike [`purge`], which releases everything, this keeps the
/// `warm_threshold` most-recently-retained segments committed so that a
/// burst of allocations immediately following the purge avoids
/// `VirtualAlloc`/`mmap` round-trips.
///
/// Pass `P::SEGMENT_POOL_WARM_THRESHOLD` for policy-level guidance, or `0`
/// for the same behaviour as `purge`.
/// Purges with `StandardPolicy::SEGMENT_POOL_WARM_THRESHOLD` warm segments kept.
///
/// A higher-level shortcut for `purge_lazy(StandardPolicy::SEGMENT_POOL_WARM_THRESHOLD)`.
/// Triggers a manual background decay and defragmentation cycle across all active memory backends.