We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b2ef41 commit 76f1c2bCopy full SHA for 76f1c2b
2 files changed
src/structures/paging/frame.rs
@@ -163,6 +163,15 @@ impl<S: PageSize> Iterator for PhysFrameRange<S> {
163
None
164
}
165
166
+
167
+ #[inline]
168
+ fn count(self) -> usize {
169
+ if !self.is_empty() {
170
+ ((self.end.start_address() - self.start.start_address()) / S::SIZE) as usize
171
+ } else {
172
+ 0
173
+ }
174
175
176
177
impl<S: PageSize> fmt::Debug for PhysFrameRange<S> {
src/structures/paging/page.rs
@@ -309,6 +309,15 @@ impl<S: PageSize> Iterator for PageRange<S> {
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
impl PageRange<Size2MiB> {
0 commit comments