Skip to content

Commit 25b7e5c

Browse files
committed
doc: more clarity in uefi/mem.rs
1 parent 793af58 commit 25b7e5c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

uefi/src/mem.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ use {core::alloc::Allocator, core::ptr::NonNull};
2323
/// success.
2424
///
2525
/// # Feature `unstable` / `allocator_api`
26-
/// By default, this function works with Rust's default allocation mechanism. If you activate the
27-
/// `unstable`-feature, it uses the `allocator_api` instead. In that case, the function takes an
28-
/// additional parameter describing the specific [`Allocator`]. You can use [`alloc::alloc::Global`]
29-
/// as default.
26+
/// By default, this function works with the allocator that is set as
27+
/// `#[global_allocator]`. This might be UEFI allocator but depends on your
28+
/// use case and how you set up the environment.
29+
///
30+
/// If you activate the `unstable`-feature, all allocations uses the provided
31+
/// allocator (via `allocator_api`) instead. In that case, the function takes an
32+
/// additional parameter describing the specific [`Allocator`]. You can use
33+
/// [`alloc::alloc::Global`] which defaults to the `#[global_allocator]`.
3034
///
3135
/// [`Allocator`]: https://doc.rust-lang.org/alloc/alloc/trait.Allocator.html
3236
/// [`alloc::alloc::Global`]: https://doc.rust-lang.org/alloc/alloc/struct.Global.html

0 commit comments

Comments
 (0)