Skip to content

Commit c170ff7

Browse files
nicholasbishopphip1611
authored andcommitted
uefi: Rename global_allocator module to allocator
1 parent 77a7a32 commit c170ff7

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## uefi - [Unreleased]
44

5+
### Changed
6+
7+
- The `uefi::global_allocator` module has been renamed to `uefi::allocator`.
8+
59
## uefi-macros - [Unreleased]
610

711
## uefi-services - [Unreleased]

uefi-services/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub fn init(st: &mut SystemTable<Boot>) -> Result {
9393
init_logger(st);
9494

9595
let boot_services = st.boot_services();
96-
uefi::global_allocator::init(boot_services);
96+
uefi::allocator::init(boot_services);
9797

9898
// Schedule these tools to be disabled on exit from UEFI boot services
9999
boot_services
@@ -191,7 +191,7 @@ unsafe extern "efiapi" fn exit_boot_services(_e: Event, _ctx: Option<NonNull<c_v
191191
logger.disable();
192192
}
193193

194-
uefi::global_allocator::exit_boot_services();
194+
uefi::allocator::exit_boot_services();
195195
}
196196

197197
#[cfg(feature = "panic_handler")]
File renamed without changes.

uefi/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub mod proto;
109109
pub mod prelude;
110110

111111
#[cfg(feature = "global_allocator")]
112-
pub mod global_allocator;
112+
pub mod allocator;
113113

114114
#[cfg(feature = "logger")]
115115
pub mod logger;

uefi/src/table/system.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ impl SystemTable<Boot> {
194194
/// Once boot services are exited, the logger and allocator provided by
195195
/// this crate can no longer be used. The logger should be disabled using
196196
/// the [`Logger::disable`] method, and the allocator should be disabled by
197-
/// calling [`global_allocator::exit_boot_services`]. Note that if the logger and
197+
/// calling [`allocator::exit_boot_services`]. Note that if the logger and
198198
/// allocator were initialized with [`uefi_services::init`], they will be
199199
/// disabled automatically when `exit_boot_services` is called.
200200
///
@@ -208,7 +208,7 @@ impl SystemTable<Boot> {
208208
/// now in an undefined state. Rather than returning control to the
209209
/// caller, the system will be reset.
210210
///
211-
/// [`global_allocator::exit_boot_services`]: crate::global_allocator::exit_boot_services
211+
/// [`allocator::exit_boot_services`]: crate::allocator::exit_boot_services
212212
/// [`Logger::disable`]: crate::logger::Logger::disable
213213
/// [`uefi_services::init`]: https://docs.rs/uefi-services/latest/uefi_services/fn.init.html
214214
#[must_use]

0 commit comments

Comments
 (0)