Skip to main content

Crate axalloc

Crate axalloc 

Source
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§

AllocationInfo
Metadata for each allocation made by the global allocator.
GlobalAllocator
The global allocator used by ArceOS for axvisor.
GlobalPage
A RAII wrapper of contiguous 4K-sized pages.
Usages
Statistics of memory usages.

Enums§

UsageKind
Kinds of memory usage for tracking.

Traits§

AddrTranslator
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§

DefaultByteAllocator
The default byte allocator for axvisor mode.