libfoedus-core
FOEDUS Core Library
|
Same as GlobalMemoryAnchors except this is for node_memories_. More...
Same as GlobalMemoryAnchors except this is for node_memories_.
Definition at line 313 of file shared_memory_repo.hpp.
#include <shared_memory_repo.hpp>
Public Types | |
enum | Constants { kChildStatusMemorySize = 1 << 12, kPagePoolMemorySize = 1 << 12, kLogReducerMemorySize = 1 << 12, kLoggerMemorySize = 1 << 21, kProcManagerMemorySize = 1 << 12, kMaxBoundaries = 1 << 12 } |
Public Member Functions | |
NodeMemoryAnchors () | |
~NodeMemoryAnchors () | |
void | clear () |
NodeMemoryAnchors (const NodeMemoryAnchors &other)=delete | |
NodeMemoryAnchors & | operator= (const NodeMemoryAnchors &other)=delete |
void | allocate_arrays (const EngineOptions &options) |
void | deallocate_arrays () |
Public Attributes | |
ChildEngineStatus * | child_status_memory_ |
This tiny piece of memory contains the current status of the child engine on this node. More... | |
memory::PagePoolControlBlock * | volatile_pool_status_ |
PagePool's status and its synchronization mechanism for the volatile pool on this node. More... | |
proc::ProcManagerControlBlock * | proc_manager_memory_ |
ProcManagers's status and its synchronization mechanism on this node. More... | |
proc::ProcAndName * | proc_memory_ |
Procedure list on this node. More... | |
proc::LocalProcId * | proc_name_sort_memory_ |
This memory stores the ID of procedures sorted by their names. More... | |
snapshot::LogReducerControlBlock * | log_reducer_memory_ |
Tiny control memory for LogReducer in this node. More... | |
void * | log_reducer_buffers_ [2] |
Actual buffers for LogReducer. More... | |
storage::Page * | log_reducer_root_info_pages_ |
This is the 'output' of the reducer in this node. More... | |
log::LoggerControlBlock ** | logger_memories_ |
Status and synchronization mechanism for loggers on this node. More... | |
ThreadMemoryAnchors * | thread_anchors_ |
Anchors for each thread. More... | |
void * | volatile_page_pool_ |
By far the largest memory for volatile page pool on this node. More... | |
assorted::ProtectedBoundary * | protected_boundaries_ [kMaxBoundaries] |
sanity check boundaries to detect bogus memory accesses that overrun a memory region More... | |
uint32_t | protected_boundaries_count_ |
To be a POD, we avoid vector and instead uses a fix-sized array. More... | |
bool | protected_boundaries_needs_release_ |
whether we have invoked mprotect on them More... | |
Enumerator | |
---|---|
kChildStatusMemorySize | |
kPagePoolMemorySize | |
kLogReducerMemorySize | |
kLoggerMemorySize | |
kProcManagerMemorySize | |
kMaxBoundaries |
Definition at line 314 of file shared_memory_repo.hpp.
|
inline |
Definition at line 323 of file shared_memory_repo.hpp.
References clear().
|
inline |
Definition at line 324 of file shared_memory_repo.hpp.
References deallocate_arrays().
|
delete |
void foedus::soc::NodeMemoryAnchors::allocate_arrays | ( | const EngineOptions & | options | ) |
Definition at line 48 of file shared_memory_repo.cpp.
References deallocate_arrays(), foedus::EngineOptions::log_, logger_memories_, foedus::log::LogOptions::loggers_per_node_, foedus::EngineOptions::thread_, thread_anchors_, and foedus::thread::ThreadOptions::thread_count_per_group_.
|
inline |
Definition at line 325 of file shared_memory_repo.hpp.
Referenced by NodeMemoryAnchors().
void foedus::soc::NodeMemoryAnchors::deallocate_arrays | ( | ) |
Definition at line 54 of file shared_memory_repo.cpp.
References logger_memories_, and thread_anchors_.
Referenced by allocate_arrays(), and ~NodeMemoryAnchors().
|
delete |
ChildEngineStatus* foedus::soc::NodeMemoryAnchors::child_status_memory_ |
This tiny piece of memory contains the current status of the child engine on this node.
Always 4kb.
Definition at line 338 of file shared_memory_repo.hpp.
Referenced by foedus::soc::SharedMemoryRepo::change_child_status(), foedus::soc::SharedMemoryRepo::get_child_status(), foedus::soc::SocManagerPimpl::initialize_master(), foedus::EnginePimpl::initialize_once(), foedus::EnginePimpl::on_module_initialized(), foedus::EnginePimpl::on_module_uninitialized(), and foedus::soc::SocManagerPimpl::wait_for_children_module().
void* foedus::soc::NodeMemoryAnchors::log_reducer_buffers_[2] |
Actual buffers for LogReducer.
Two for switching. Size is SnapshotOptions::log_reducer_buffer_mb_ in total of the two.
Definition at line 373 of file shared_memory_repo.hpp.
Referenced by foedus::snapshot::LogReducerRef::get_buffer(), foedus::snapshot::LogReducer::LogReducer(), and foedus::snapshot::LogReducerRef::LogReducerRef().
snapshot::LogReducerControlBlock* foedus::soc::NodeMemoryAnchors::log_reducer_memory_ |
Tiny control memory for LogReducer in this node.
Always 4kb. The reducer buffers are allocated separately below.
Definition at line 367 of file shared_memory_repo.hpp.
Referenced by foedus::snapshot::LogReducer::LogReducer(), and foedus::snapshot::LogReducerRef::LogReducerRef().
storage::Page* foedus::soc::NodeMemoryAnchors::log_reducer_root_info_pages_ |
This is the 'output' of the reducer in this node.
Each page contains a root-info page of one storage processed in the reducer. Size is StorageOptions::max_storages_ * 4kb.
Definition at line 380 of file shared_memory_repo.hpp.
Referenced by foedus::snapshot::LogReducer::LogReducer(), and foedus::snapshot::LogReducerRef::LogReducerRef().
log::LoggerControlBlock** foedus::soc::NodeMemoryAnchors::logger_memories_ |
Status and synchronization mechanism for loggers on this node.
Index is node-local logger ID. 4kb for each logger.
Definition at line 387 of file shared_memory_repo.hpp.
Referenced by allocate_arrays(), deallocate_arrays(), and foedus::log::LogManagerPimpl::initialize_once().
proc::ProcManagerControlBlock* foedus::soc::NodeMemoryAnchors::proc_manager_memory_ |
ProcManagers's status and its synchronization mechanism on this node.
Always 4kb.
Definition at line 350 of file shared_memory_repo.hpp.
Referenced by foedus::proc::ProcManagerPimpl::initialize_once().
proc::ProcAndName* foedus::soc::NodeMemoryAnchors::proc_memory_ |
Procedure list on this node.
The size is sizeof(proc::ProcAndName) * ProcOptions::max_proc_count_.
Definition at line 355 of file shared_memory_repo.hpp.
Referenced by foedus::proc::ProcManagerPimpl::initialize_once().
proc::LocalProcId* foedus::soc::NodeMemoryAnchors::proc_name_sort_memory_ |
This memory stores the ID of procedures sorted by their names.
The size is 4 (=sizeof(LocalProcId)) * ProcOptions::max_proc_count_.
Definition at line 360 of file shared_memory_repo.hpp.
Referenced by foedus::proc::ProcManagerPimpl::initialize_once().
assorted::ProtectedBoundary* foedus::soc::NodeMemoryAnchors::protected_boundaries_[kMaxBoundaries] |
sanity check boundaries to detect bogus memory accesses that overrun a memory region
Definition at line 398 of file shared_memory_repo.hpp.
Referenced by foedus::soc::SharedMemoryRepo::deallocate_shared_memories().
uint32_t foedus::soc::NodeMemoryAnchors::protected_boundaries_count_ |
To be a POD, we avoid vector and instead uses a fix-sized array.
Definition at line 400 of file shared_memory_repo.hpp.
Referenced by foedus::soc::SharedMemoryRepo::deallocate_shared_memories().
bool foedus::soc::NodeMemoryAnchors::protected_boundaries_needs_release_ |
whether we have invoked mprotect on them
Definition at line 402 of file shared_memory_repo.hpp.
ThreadMemoryAnchors* foedus::soc::NodeMemoryAnchors::thread_anchors_ |
Anchors for each thread.
Index is node-local thread ordinal.
Definition at line 392 of file shared_memory_repo.hpp.
Referenced by allocate_arrays(), deallocate_arrays(), and foedus::soc::SharedMemoryRepo::get_thread_memory_anchors().
void* foedus::soc::NodeMemoryAnchors::volatile_page_pool_ |
By far the largest memory for volatile page pool on this node.
Definition at line 395 of file shared_memory_repo.hpp.
Referenced by foedus::soc::SharedMemoryRepo::get_volatile_pool().
memory::PagePoolControlBlock* foedus::soc::NodeMemoryAnchors::volatile_pool_status_ |
PagePool's status and its synchronization mechanism for the volatile pool on this node.
Always 4kb.
Definition at line 344 of file shared_memory_repo.hpp.
Referenced by foedus::memory::NumaNodeMemory::initialize_once(), and foedus::memory::NumaNodeMemoryRef::NumaNodeMemoryRef().