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.
Modules§
- tracking
- Tracking of memory usage, enabled with the
trackingfeature.
Structs§
- Global
Allocator - The global allocator used by ArceOS when
buddy-slabis enabled. - Global
Page - A RAII wrapper of contiguous 4K-sized pages.
- Usages
- Statistics of memory usages.
Enums§
- Alloc
Error - The error type used for allocation operations in
ax-alloc. - Usage
Kind - Kinds of memory usage for tracking.
Traits§
- Allocator
Ops - Unified allocator operations provided by all
ax-allocbackends.
Functions§
- 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.
- init_
percpu_ slab - Initializes the per-CPU slab for the current CPU.
Type Aliases§
- Alloc
Result - A
Resultalias withAllocErroras the error type. - Default
Byte Allocator - The default byte allocator for buddy-slab mode.