# Trait os::mm::frame_allocator::FrameAllocator

source · [−]

    trait FrameAllocator {
        fn new() -> Self;
        fn alloc(&mut self) -> Option<PhysPageNum>;
        fn dealloc(&mut self, ppn: PhysPageNum);
    }

## Required methods

source

#### fn new() -> Self

source

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

source

#### fn dealloc(&mut self, ppn: PhysPageNum)

## Implementors

source

### impl FrameAllocator for StackFrameAllocator