/// Try to refill our core-local zone allocator.
///
/// We come here if a previous allocation failed.
Try to refill our core-local zone allocator.
We come here if a previous allocation failed.
Try to refill our core - local zone allocator . We come here if a previous allocation failed .
fn try_refill(&self, layout: Layout, e: KError) -> Result<(), KError> {
        match (KernelAllocator::allocator_for(layout), e) {
            (AllocatorType::Zone, KError::CacheExhausted) => {
                let (needed_base_pages, needed_large_pages) =
                    KernelAllocator::refill_amount(layout);
                self.maybe_refill_tcache(needed_base_pages, needed_large_pages)?;
                self.try_refill_zone(layout)
            }
            (AllocatorType::MapBig, _) => {
                let (needed_base_pages, needed_large_pages) =
                    KernelAllocator::refill_amount(layout);
                KernelAllocator::try_refill_tcache(
                    needed_base_pages,
                    needed_large_pages,
                    MemType::Mem,
                )
            }
            (AllocatorType::MemManager, _) => {
                let (needed_base_pages, needed_large_pages) =
                    KernelAllocator::refill_amount(layout);
                KernelAllocator::try_refill_tcache(
                    needed_base_pages,
                    needed_large_pages,
                    MemType::Mem,
                )
            }
            (AllocatorType::Zone, _) => unreachable!("Not sure how to handle"),
        }
    }
fn try_refill ( & self , layout : Layout , e : KError ) -> Result < ( ) , KError > { match ( KernelAllocator :: allocator_for ( layout ) , e ) { ( AllocatorType :: Zone , KError :: CacheExhausted ) => { let ( needed_base_pages , needed_large_pages ) = KernelAllocator :: refill_amount ( layout ) ; self . maybe_refill_tcache ( needed_base_pages , needed_large_pages ) ? ; self . try_refill_zone ( layout ) } ( AllocatorType :: MapBig , _ ) => { let ( needed_base_pages , needed_large_pages ) = KernelAllocator :: refill_amount ( layout ) ; KernelAllocator :: try_refill_tcache ( needed_base_pages , needed_large_pages , MemType :: Mem , ) } ( AllocatorType :: MemManager , _ ) => { let ( needed_base_pages , needed_large_pages ) = KernelAllocator :: refill_amount ( layout ) ; KernelAllocator :: try_refill_tcache ( needed_base_pages , needed_large_pages , MemType :: Mem , ) } ( AllocatorType :: Zone , _ ) => unreachable ! ( " " ) , } }
Try to refill our core-local zone allocator.
Try to refill our core - local zone allocator .
&self
layout
Layout
e
KError