Trait sanakirja_core::AllocPage [−][src]
Trait for allocating and freeing pages.
Required methods
fn alloc_page(&mut self) -> Result<MutPage, Self::Error>
[src]
Allocate a new page.
fn incr_rc(&mut self, off: u64) -> Result<usize, Self::Error>
[src]
Increment the page's reference count.
fn decr_rc(&mut self, off: u64) -> Result<usize, Self::Error>
[src]
Decrement the page's reference count, assuming the page was first allocated by another transaction. If the RC reaches 0, free the page. Must return the new RC (0 if freed).
fn decr_rc_owned(&mut self, off: u64) -> Result<usize, Self::Error>
[src]
Same as Self::decr_rc
, but for pages allocated by the current
transaction. This is an important distinction, as pages
allocated by the current transaction can be reused immediately
after being freed.