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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
use crateVmemError;
/// The observed result of one [`try_decommit`](crate::try_decommit) /
/// [`Reservation::try_decommit`](crate::Reservation::try_decommit) call —
/// **task #1180 (PUB-R2 phase 2)**, replacing the pre-#1180
/// `Result<(), VmemError>` return, which reported only whether the
/// CALLER'S ARGUMENTS were valid, never what the OS actually did (or was
/// even asked to do).
///
/// The outer `Result<DecommitOutcome, VmemError>` still reports a caller
/// contract violation exactly as before (`Err(VmemError::invalid_argument())`
/// for a malformed range, `Err(VmemError::os_refusal_unknown_code())` if the
/// one-time OS page-size query failed) — see
/// [`try_decommit`](crate::try_decommit)'s own `# Errors` section. What is
/// new is the `Ok` payload: three variants that distinguish "no backend
/// call was made" from "the backend call was made and refused" from "the
/// SELECTED BACKEND accepted the request", where the pre-#1180 signature
/// collapsed all three into the same `Ok(())`. That acceptance does NOT
/// by itself imply that a real OS syscall ran — under the
/// `aligned_vmem_mock` cfg or miri no syscall runs at all, and `Advised`
/// is the simulated backend's own unconditional answer (see
/// [`DecommitOutcome::Advised`]'s own doc for the per-backend meaning).
///
/// **None of the three variants is a claim about physical memory having
/// actually been reclaimed.** Decommit is best-effort by nature (see
/// [`Reservation::decommit_reclaims_and_zeroes`](crate::Reservation::decommit_reclaims_and_zeroes)
/// for which platforms guarantee reclaim+zero-fill at all) — this type
/// answers "what did this call do", not "what did it accomplish".