libfoedus-core
FOEDUS Core Library
foedus::storage::hash::TmpSnashotPage Struct Reference

Detailed Description

Definition at line 36 of file hash_storage_debug.cpp.

Collaboration diagram for foedus::storage::hash::TmpSnashotPage:

Public Member Functions

ErrorStack init (cache::SnapshotFileSet *files, SnapshotPagePointer pointer)
 
HashIntermediatePageas_intermediate ()
 
HashDataPageas_data ()
 

Public Attributes

memory::AlignedMemory buf_
 
Pagepage_
 

Member Function Documentation

HashDataPage* foedus::storage::hash::TmpSnashotPage::as_data ( )
inline

Definition at line 47 of file hash_storage_debug.cpp.

References page_.

Referenced by foedus::storage::hash::HashStoragePimpl::debugout_single_thread_data(), and foedus::storage::hash::HashStoragePimpl::debugout_single_thread_intermediate().

47 { return reinterpret_cast<HashDataPage*>(page_); }

Here is the caller graph for this function:

HashIntermediatePage* foedus::storage::hash::TmpSnashotPage::as_intermediate ( )
inline

Definition at line 46 of file hash_storage_debug.cpp.

References page_.

Referenced by foedus::storage::hash::HashStoragePimpl::debugout_single_thread(), and foedus::storage::hash::HashStoragePimpl::debugout_single_thread_intermediate().

46 { return reinterpret_cast<HashIntermediatePage*>(page_); }

Here is the caller graph for this function:

ErrorStack foedus::storage::hash::TmpSnashotPage::init ( cache::SnapshotFileSet files,
SnapshotPagePointer  pointer 
)
inline

Definition at line 37 of file hash_storage_debug.cpp.

References foedus::memory::AlignedMemory::alloc(), buf_, foedus::memory::AlignedMemory::get_block(), foedus::memory::AlignedMemory::get_size(), foedus::memory::AlignedMemory::is_null(), foedus::memory::AlignedMemory::kNumaAllocOnnode, foedus::kRetOk, page_, foedus::cache::SnapshotFileSet::read_page(), and WRAP_ERROR_CODE.

Referenced by foedus::storage::hash::HashStoragePimpl::debugout_single_thread(), foedus::storage::hash::HashStoragePimpl::debugout_single_thread_data(), and foedus::storage::hash::HashStoragePimpl::debugout_single_thread_intermediate().

37  {
38  if (buf_.is_null() || buf_.get_size() < 1 << 12U) {
39  buf_.alloc(1 << 12U, 1 << 12U, memory::AlignedMemory::kNumaAllocOnnode, 0);
40  }
41  page_ = reinterpret_cast<Page*>(buf_.get_block());
42  WRAP_ERROR_CODE(files->read_page(pointer, page_));
43  return kRetOk;
44  }
numa_alloc_onnode() and numa_free().
void alloc(uint64_t size, uint64_t alignment, AllocType alloc_type, int numa_node) noexcept
Allocate a memory, releasing the current memory if exists.
void * get_block() const
Returns the memory block.
uint64_t get_size() const
Returns the byte size of the memory block.
const ErrorStack kRetOk
Normal return value for no-error case.
#define WRAP_ERROR_CODE(x)
Same as CHECK_ERROR(x) except it receives only an error code, thus more efficient.
bool is_null() const
Returns if this object doesn't hold a valid memory block.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

memory::AlignedMemory foedus::storage::hash::TmpSnashotPage::buf_

Definition at line 49 of file hash_storage_debug.cpp.

Referenced by init().

Page* foedus::storage::hash::TmpSnashotPage::page_

Definition at line 50 of file hash_storage_debug.cpp.

Referenced by as_data(), as_intermediate(), and init().


The documentation for this struct was generated from the following file: