pub struct AllocatorInfo {
pub allocator_type: AllocatorType,
pub reason: String,
pub system_info: SystemInfo,
}
Expand description
Allocator information structure
Contains the currently selected allocator type, selection reason, and system information.
Obtained through the get_allocator_info()
function.
§Fields
allocator_type
- Currently used allocator typereason
- Detailed reason for allocator selection, including hardware informationsystem_info
- System hardware and environment information
§Example
use auto_allocator;
let info = auto_allocator::get_allocator_info();
println!("Allocator: {:?}", info.allocator_type);
println!("Selection reason: {}", info.reason);
println!("CPU cores: {}", info.system_info.cpu_cores);
Fields§
§allocator_type: AllocatorType
Currently used allocator type
reason: String
Detailed reason for allocator selection
Contains hardware detection results and selection logic explanation, for example: “mimalloc selected by runtime hardware analysis (16 cores, 128GB total RAM)”
system_info: SystemInfo
System hardware and environment information
Trait Implementations§
Source§impl Clone for AllocatorInfo
impl Clone for AllocatorInfo
Source§fn clone(&self) -> AllocatorInfo
fn clone(&self) -> AllocatorInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for AllocatorInfo
impl RefUnwindSafe for AllocatorInfo
impl Send for AllocatorInfo
impl Sync for AllocatorInfo
impl Unpin for AllocatorInfo
impl UnwindSafe for AllocatorInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more