pub struct PageAllocator { /* private fields */ }Implementations§
Source§impl PageAllocator
impl PageAllocator
pub fn new(high_water_mark: u32) -> Self
Sourcepub fn allocate(&mut self) -> PageId
pub fn allocate(&mut self) -> PageId
Prefers reusing reclaimed pages over incrementing the high water mark.
Sourcepub fn free(&mut self, page_id: PageId)
pub fn free(&mut self, page_id: PageId)
Not immediately reusable - goes into pending-free list.
pub fn high_water_mark(&self) -> u32
pub fn freed_this_txn(&self) -> &[PageId]
pub fn add_ready_to_use(&mut self, pages: Vec<PageId>)
pub fn commit(&mut self) -> Vec<PageId>
pub fn rollback(&mut self)
pub fn ready_count(&self) -> usize
pub fn freed_count(&self) -> usize
Auto Trait Implementations§
impl Freeze for PageAllocator
impl RefUnwindSafe for PageAllocator
impl Send for PageAllocator
impl Sync for PageAllocator
impl Unpin for PageAllocator
impl UnsafeUnpin for PageAllocator
impl UnwindSafe for PageAllocator
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