libfoedus-core
FOEDUS Core Library
|
Resolves an offset in local (same NUMA node) page pool to a pointer and vice versa. More...
Resolves an offset in local (same NUMA node) page pool to a pointer and vice versa.
This class abstracts how we convert 4-byte page-pool offset to/from 8-byte pointer for cases where we are handling a page that resides in a local page pool. Especially, snapshot pages and snapshotting can always use this page resolver.
This object is copiable and the copying is very efficient. The size of this object is only 16 bytes.
Definition at line 42 of file page_resolver.hpp.
#include <page_resolver.hpp>
Public Member Functions | |
LocalPageResolver () | |
LocalPageResolver (storage::Page *base, PagePoolOffset begin, PagePoolOffset end) | |
PagePoolOffset | resolve_page (storage::Page *page) const __attribute__((always_inline)) |
Resolves storage::Page* to offset in this pool. More... | |
storage::Page * | resolve_offset (PagePoolOffset offset) const __attribute__((always_inline)) |
Resolves offset in this pool to storage::Page*. More... | |
storage::Page * | resolve_offset_newpage (PagePoolOffset offset) const __attribute__((always_inline)) |
As the name suggests, this version is for new pages, which don't have sanity checks. More... | |
Public Attributes | |
PagePoolOffset | begin_ |
where a valid page entry starts. More... | |
PagePoolOffset | end_ |
where a valid page entry ends. More... | |
storage::Page * | base_ |
base address to calculate from/to offset. More... | |
|
inline |
Definition at line 43 of file page_resolver.hpp.
|
inline |
Definition at line 44 of file page_resolver.hpp.
|
inline |
Resolves offset in this pool to storage::Page*.
Definition at line 57 of file page_resolver.hpp.
References foedus::storage::assert_valid_volatile_page(), and resolve_offset_newpage().
Referenced by foedus::storage::sequential::SequentialStoragePimpl::append_record(), foedus::storage::sequential::SequentialStoragePimpl::drop(), foedus::storage::sequential::SequentialComposer::drop_volatiles(), foedus::storage::sequential::SequentialStoragePimpl::for_every_page(), foedus::storage::sequential::SequentialStoragePimpl::get_head(), foedus::storage::sequential::SequentialStoragePimpl::get_tail(), and foedus::thread::Thread::resolve().
|
inline |
As the name suggests, this version is for new pages, which don't have sanity checks.
Definition at line 64 of file page_resolver.hpp.
References ASSERT_ND, base_, begin_, and end_.
Referenced by foedus::storage::sequential::SequentialStoragePimpl::append_record(), foedus::storage::hash::HashStoragePimpl::create(), foedus::storage::hash::HashStoragePimpl::follow_page_bin_head(), foedus::thread::ThreadPimpl::follow_page_pointer(), foedus::thread::ThreadPimpl::follow_page_pointers_for_read_batch(), foedus::thread::ThreadPimpl::follow_page_pointers_for_write_batch(), foedus::memory::EngineMemory::grab_one_volatile_page(), foedus::storage::sequential::SequentialStoragePimpl::initialize_head_tail_pages(), foedus::thread::ThreadPimpl::install_a_volatile_page(), foedus::storage::masstree::MasstreeStoragePimpl::load_empty(), foedus::thread::ThreadPimpl::place_a_new_volatile_page(), foedus::thread::Thread::resolve_newpage(), resolve_offset(), and foedus::storage::masstree::ReserveRecords::run().
|
inline |
Resolves storage::Page* to offset in this pool.
Definition at line 50 of file page_resolver.hpp.
References ASSERT_ND, base_, begin_, and end_.
storage::Page* foedus::memory::LocalPageResolver::base_ |
base address to calculate from/to offset.
Definition at line 75 of file page_resolver.hpp.
Referenced by resolve_offset_newpage(), and resolve_page().
PagePoolOffset foedus::memory::LocalPageResolver::begin_ |
where a valid page entry starts.
only for sanity checking.
Definition at line 71 of file page_resolver.hpp.
Referenced by foedus::memory::EngineMemory::initialize_once(), resolve_offset_newpage(), and resolve_page().
PagePoolOffset foedus::memory::LocalPageResolver::end_ |
where a valid page entry ends.
only for sanity checking.
Definition at line 73 of file page_resolver.hpp.
Referenced by foedus::thread::ThreadPimpl::follow_page_pointer(), foedus::memory::EngineMemory::initialize_once(), foedus::thread::ThreadPimpl::install_a_volatile_page(), resolve_offset_newpage(), and resolve_page().