pub struct AllocationRouter { /* private fields */ }Expand description
Allocation routing logic
Implementations§
Source§impl AllocationRouter
impl AllocationRouter
pub fn new(config: RouterConfig) -> Self
Sourcepub fn route_allocation(
&mut self,
size: usize,
pattern: Option<AllocationPattern>,
) -> AllocatorType
pub fn route_allocation( &mut self, size: usize, pattern: Option<AllocationPattern>, ) -> AllocatorType
Route allocation request to appropriate allocator
Sourcepub fn update_performance(
&mut self,
allocator_type: AllocatorType,
metrics: PerformanceMetrics,
)
pub fn update_performance( &mut self, allocator_type: AllocatorType, metrics: PerformanceMetrics, )
Update performance metrics for an allocator
Sourcepub fn cache_pattern_route(
&mut self,
pattern: AllocationPattern,
allocator_type: AllocatorType,
)
pub fn cache_pattern_route( &mut self, pattern: AllocationPattern, allocator_type: AllocatorType, )
Cache pattern-based routing decision
Auto Trait Implementations§
impl Freeze for AllocationRouter
impl RefUnwindSafe for AllocationRouter
impl Send for AllocationRouter
impl Sync for AllocationRouter
impl Unpin for AllocationRouter
impl UnsafeUnpin for AllocationRouter
impl UnwindSafe for AllocationRouter
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more