File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 44
55### Changed
66
7- - The ` uefi::global_allocator ` module has been renamed to ` uefi::allocator ` .
7+ - The ` global_allocator ` module has been renamed to ` allocator ` , and is now
8+ available regardless of whether the ` global_allocator ` feature is enabled. The
9+ ` global_allocator ` feature now only controls whether ` allocator::Allocator ` is
10+ set as Rust's global allocator.
811
912## uefi-macros - [ Unreleased]
1013
Original file line number Diff line number Diff line change 11//! This module implements Rust's global allocator interface using UEFI's memory allocation functions.
22//!
3- //! Enabling the `alloc` optional feature in your app will allow you to use Rust's higher-level data structures,
4- //! like boxes, vectors, hash maps, linked lists and so on .
3+ //! If the `global_allocator` feature is enabled, the [`Allocator`] will be used
4+ //! as the global Rust allocator .
55//!
66//! # Usage
77//!
@@ -112,5 +112,6 @@ unsafe impl GlobalAlloc for Allocator {
112112 }
113113}
114114
115+ #[ cfg( feature = "global_allocator" ) ]
115116#[ global_allocator]
116117static ALLOCATOR : Allocator = Allocator ;
Original file line number Diff line number Diff line change 4343//! `Vec` rather than filling a statically-sized array. This requires
4444//! a global allocator; you can use the `global_allocator` feature or
4545//! provide your own.
46- //! - `global_allocator`: Implement a [global allocator] using UEFI
47- //! functions . This is a simple allocator that relies on the UEFI pool
46+ //! - `global_allocator`: Set [` allocator::Allocator`] as the global Rust
47+ //! allocator . This is a simple allocator that relies on the UEFI pool
4848//! allocator. You can choose to provide your own allocator instead of
4949//! using this feature, or no allocator at all if you don't need to
5050//! dynamically allocate any memory.
@@ -108,7 +108,6 @@ pub mod proto;
108108
109109pub mod prelude;
110110
111- #[ cfg( feature = "global_allocator" ) ]
112111pub mod allocator;
113112
114113#[ cfg( feature = "logger" ) ]
You can’t perform that action at this time.
0 commit comments