Expand description
A free-list-based page/frame allocator.
The main type of this crate is FreeList, which allocates PageRanges.
§Examples
use free_list::{FreeList, PageLayout};
let mut free_list = FreeList::<16>::new();
unsafe {
    free_list.deallocate((0x1000..0x5000).try_into().unwrap()).unwrap();
}
assert_eq!(free_list.free_space(), 0x4000);
let layout = PageLayout::from_size(0x4000).unwrap();
assert_eq!(free_list.allocate(layout).unwrap(), (0x1000..0x5000).try_into().unwrap());Structs§
- AllocError 
- Allocation failure.
- FreeList 
- A free-list-based page/frame allocator.
- PageLayout 
- Layout of a range of pages.
- PageLayout Error 
- Invalid parameters used in PageLayoutconstruction.
- PageRange 
- A non-empty page-aligned memory range.
- PageRange Error 
- Invalid parameters in PageRangeconstruction.
Enums§
- PageRange Sub 
- The output of PageRange::sub.
Constants§
- PAGE_SIZE 
- The base page size.