Skip to content

Commit c23c1c3

Browse files
committed
uefi: mem: doc fixes
1 parent f183718 commit c23c1c3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

uefi/src/mem/memory_map/impl_.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ impl IndexMut<usize> for MemoryMapRefMut<'_> {
202202
/// 1. create it using [`MemoryMapBackingMemory::new`]
203203
/// 2. pass it to [`BootServices::get_memory_map`]
204204
/// 3. construct a [`MemoryMapOwned`] from it
205+
///
206+
/// [`BootServices::get_memory_map`]: crate::table::boot::BootServices::get_memory_map
205207
#[derive(Debug)]
206208
#[allow(clippy::len_without_is_empty)] // this type is never empty
207209
pub(crate) struct MemoryMapBackingMemory(NonNull<[u8]>);
@@ -248,8 +250,9 @@ impl MemoryMapBackingMemory {
248250
}
249251

250252
/// Returns a "safe" best-effort size hint for the memory map size with
251-
/// some additional bytes in buffer compared to the [`crate::table::boot::mmap::MemoryMapMeta`].
252-
/// This helps
253+
/// some additional bytes in buffer compared to the [`MemoryMapMeta`]. This
254+
/// takes into account that, as you go, more (small) allocations might
255+
/// happen.
253256
#[must_use]
254257
fn safe_allocation_size_hint(mmm: MemoryMapMeta) -> usize {
255258
// Allocate space for extra entries beyond the current size of the

0 commit comments

Comments
 (0)