# FrameAllocatorFor in riscv::paging - Rust
A trait for types that can allocate a frame of memory.
Keywords: rust, rustlang, rust-lang, FrameAllocatorFor

# Trait riscv::paging::FrameAllocatorFor

source · [−]

    pub trait FrameAllocatorFor<P: PhysicalAddress> {
        fn alloc(&mut self) -> Option<FrameWith<P>>;
    }

Expand description

A trait for types that can allocate a frame of memory.

## Required methods

source

#### fn alloc(&mut self) -> Option<FrameWith<P>>

Allocate a frame of the appropriate size and return it if possible.

## Implementors

source

### impl<T: FrameAllocator> FrameAllocatorFor<PhysAddrSv48> for T