Expand description
ArceOS global memory allocator.
It provides GlobalAllocator, which implements the trait
core::alloc::GlobalAlloc. A static global variable of type
GlobalAllocator is defined with the #[global_allocator] attribute, to
be registered as the standard library’s default allocator.
Structs§
- Allocation
Info - Metadata for each allocation made by the global allocator.
- Global
Allocator - The global allocator used by ArceOS for axvisor.
- Global
Page - A RAII wrapper of contiguous 4K-sized pages.
- Usages
- Statistics of memory usages.
Enums§
- Usage
Kind - Kinds of memory usage for tracking.
Traits§
- Addr
Translator - Address translator used by allocators to reason about physical addresses.
Functions§
- allocations_
in - Visits all allocations made by the global allocator within the given generation range.
- current_
generation - Returns the current generation of the global allocator.
- disable_
tracking - Disables allocation tracking.
- enable_
tracking - Enables allocation tracking.
- global_
add_ memory - Add the given memory region to the global allocator.
- global_
allocator - Returns the reference to the global allocator.
- global_
init - Initializes the global allocator with the given memory region.
- tracking_
enabled - Returns whether allocation tracking is enabled.
Type Aliases§
- Default
Byte Allocator - The default byte allocator for axvisor mode.