libfoedus-core
FOEDUS Core Library
|
Just a set of pointers within global_memory_ for ease of use. More...
Just a set of pointers within global_memory_ for ease of use.
All pointers are at least 8-byte aligned. Most of them are 4kb aligned.
Definition at line 218 of file shared_memory_repo.hpp.
#include <shared_memory_repo.hpp>
Public Types | |
enum | Constants { kMasterStatusMemorySize = 1 << 12, kLogManagerMemorySize = 1 << 12, kMetaLoggerSize = 1 << 13, kRestartManagerMemorySize = 1 << 12, kSavepointManagerMemorySize = (3 << 19) + (1 << 12), kSnapshotManagerMemorySize = 1 << 12, kStorageManagerMemorySize = 1 << 12, kXctManagerMemorySize = 1 << 12, kStorageMemorySize = 1 << 12, kMaxBoundaries = 1 << 7 } |
Public Member Functions | |
GlobalMemoryAnchors () | |
~GlobalMemoryAnchors () | |
void | clear () |
GlobalMemoryAnchors (const GlobalMemoryAnchors &other)=delete | |
GlobalMemoryAnchors & | operator= (const GlobalMemoryAnchors &other)=delete |
Public Attributes | |
uint64_t | options_xml_length_ |
The beginning of global memory is an XML-serialized EngineOption. More... | |
char * | options_xml_ |
The xml itself. More... | |
MasterEngineStatus * | master_status_memory_ |
This tiny piece of memory contains the current status of the master engine and its synchronization mechanisms. More... | |
log::LogManagerControlBlock * | log_manager_memory_ |
Tiny memory for log manager. More... | |
log::MetaLogControlBlock * | meta_logger_memory_ |
Tiny memory for metadata logger. More... | |
restart::RestartManagerControlBlock * | restart_manager_memory_ |
Tiny memory for restart manager. More... | |
savepoint::SavepointManagerControlBlock * | savepoint_manager_memory_ |
Tiny memory for savepoint manager. More... | |
snapshot::SnapshotManagerControlBlock * | snapshot_manager_memory_ |
Tiny memory for snapshot manager. More... | |
storage::StorageManagerControlBlock * | storage_manager_memory_ |
Tiny memory for storage manager. More... | |
xct::XctManagerControlBlock * | xct_manager_memory_ |
Tiny memory for xct manager. More... | |
storage::PartitionerMetadata * | partitioner_metadata_ |
Tiny metadata memory for partitioners. More... | |
void * | partitioner_data_ |
Data block to place detailed information of partitioners. More... | |
storage::StorageId * | storage_name_sort_memory_ |
This memory stores the ID of storages sorted by their names. More... | |
storage::StorageControlBlock * | storage_memories_ |
Status of each storage instance is stored in this shared memory. More... | |
void * | user_memory_ |
This 'user memory' can be used for arbitrary purporses by the user to communicate between SOCs. 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... | |
Definition at line 219 of file shared_memory_repo.hpp.
|
inline |
Definition at line 233 of file shared_memory_repo.hpp.
References clear().
|
inline |
Definition at line 234 of file shared_memory_repo.hpp.
|
delete |
|
inline |
Definition at line 235 of file shared_memory_repo.hpp.
Referenced by foedus::soc::SharedMemoryRepo::deallocate_shared_memories(), and GlobalMemoryAnchors().
|
delete |
log::LogManagerControlBlock* foedus::soc::GlobalMemoryAnchors::log_manager_memory_ |
Tiny memory for log manager.
Always 4kb.
Definition at line 253 of file shared_memory_repo.hpp.
Referenced by foedus::log::LogManagerPimpl::initialize_once().
MasterEngineStatus* foedus::soc::GlobalMemoryAnchors::master_status_memory_ |
This tiny piece of memory contains the current status of the master engine and its synchronization mechanisms.
Always 4kb.
Definition at line 250 of file shared_memory_repo.hpp.
Referenced by foedus::soc::SharedMemoryRepo::allocate_shared_memories(), foedus::soc::SharedMemoryRepo::change_master_status(), foedus::soc::SharedMemoryRepo::get_master_status(), foedus::soc::SocManagerPimpl::initialize_master(), foedus::EnginePimpl::on_module_initialized(), foedus::EnginePimpl::on_module_uninitialized(), foedus::soc::SocManagerPimpl::report_engine_fatal_error(), and foedus::soc::SocManagerPimpl::wait_for_master_module().
log::MetaLogControlBlock* foedus::soc::GlobalMemoryAnchors::meta_logger_memory_ |
Tiny memory for metadata logger.
Always 4kb.
Definition at line 255 of file shared_memory_repo.hpp.
Referenced by foedus::log::MetaLogger::initialize_once(), foedus::log::LogManagerPimpl::initialize_once(), and foedus::savepoint::SavepointManagerPimpl::savepoint_main().
char* foedus::soc::GlobalMemoryAnchors::options_xml_ |
uint64_t foedus::soc::GlobalMemoryAnchors::options_xml_length_ |
The beginning of global memory is an XML-serialized EngineOption.
The byte size.
Definition at line 242 of file shared_memory_repo.hpp.
void* foedus::soc::GlobalMemoryAnchors::partitioner_data_ |
Data block to place detailed information of partitioners.
The size is StorageOptions::partitioner_data_memory_mb_.
Definition at line 276 of file shared_memory_repo.hpp.
Referenced by foedus::storage::PartitionerMetadata::locate_data(), and foedus::snapshot::LogGleanerRef::LogGleanerRef().
storage::PartitionerMetadata* foedus::soc::GlobalMemoryAnchors::partitioner_metadata_ |
Tiny metadata memory for partitioners.
It points to blocks in the following data memory. The size is sizeof(storage::PartitionerMetadata) * StorageOptions::max_storages_.
Definition at line 271 of file shared_memory_repo.hpp.
Referenced by foedus::storage::PartitionerMetadata::get_index0_metadata(), foedus::storage::PartitionerMetadata::get_metadata(), foedus::snapshot::SnapshotManagerPimpl::initialize_once(), foedus::snapshot::LogGleanerRef::LogGleanerRef(), and foedus::snapshot::SnapshotManagerPimpl::uninitialize_once().
assorted::ProtectedBoundary* foedus::soc::GlobalMemoryAnchors::protected_boundaries_[kMaxBoundaries] |
sanity check boundaries to detect bogus memory accesses that overrun a memory region
Definition at line 302 of file shared_memory_repo.hpp.
Referenced by foedus::soc::SharedMemoryRepo::deallocate_shared_memories().
uint32_t foedus::soc::GlobalMemoryAnchors::protected_boundaries_count_ |
To be a POD, we avoid vector and instead uses a fix-sized array.
Definition at line 304 of file shared_memory_repo.hpp.
Referenced by foedus::soc::SharedMemoryRepo::deallocate_shared_memories().
bool foedus::soc::GlobalMemoryAnchors::protected_boundaries_needs_release_ |
whether we have invoked mprotect on them
Definition at line 306 of file shared_memory_repo.hpp.
Referenced by foedus::soc::SharedMemoryRepo::deallocate_shared_memories().
restart::RestartManagerControlBlock* foedus::soc::GlobalMemoryAnchors::restart_manager_memory_ |
savepoint::SavepointManagerControlBlock* foedus::soc::GlobalMemoryAnchors::savepoint_manager_memory_ |
Tiny memory for savepoint manager.
Always 4kb.
Definition at line 259 of file shared_memory_repo.hpp.
snapshot::SnapshotManagerControlBlock* foedus::soc::GlobalMemoryAnchors::snapshot_manager_memory_ |
Tiny memory for snapshot manager.
Always 4kb.
Definition at line 261 of file shared_memory_repo.hpp.
Referenced by foedus::snapshot::SnapshotManagerPimpl::initialize_once(), and foedus::snapshot::LogGleanerRef::LogGleanerRef().
storage::StorageManagerControlBlock* foedus::soc::GlobalMemoryAnchors::storage_manager_memory_ |
Tiny memory for storage manager.
Always 4kb.
Definition at line 263 of file shared_memory_repo.hpp.
Referenced by foedus::storage::StorageManagerPimpl::initialize_once().
storage::StorageControlBlock* foedus::soc::GlobalMemoryAnchors::storage_memories_ |
Status of each storage instance is stored in this shared memory.
The size for one storage must be within 4kb. If the storage type requires more than 4kb, just grab a page from volatile page pools and point to it from the storage object. sizeof(storage::StorageControlBlock) is exactly 4kb, so we can treat this like an array, not an array of pointers. The size is 4kb * StorageOptions::max_storages_.
Definition at line 292 of file shared_memory_repo.hpp.
Referenced by foedus::storage::StorageManagerPimpl::initialize_once().
storage::StorageId* foedus::soc::GlobalMemoryAnchors::storage_name_sort_memory_ |
This memory stores the ID of storages sorted by their names.
The size is 4 (=sizeof(StorageId)) * StorageOptions::max_storages_.
Definition at line 282 of file shared_memory_repo.hpp.
Referenced by foedus::storage::StorageManagerPimpl::initialize_once().
void* foedus::soc::GlobalMemoryAnchors::user_memory_ |
This 'user memory' can be used for arbitrary purporses by the user to communicate between SOCs.
The size is SocOptions::shared_user_memory_size_kb_.
Definition at line 299 of file shared_memory_repo.hpp.
Referenced by foedus::soc::SharedMemoryRepo::get_global_user_memory().
xct::XctManagerControlBlock* foedus::soc::GlobalMemoryAnchors::xct_manager_memory_ |
Tiny memory for xct manager.
Always 4kb.
Definition at line 265 of file shared_memory_repo.hpp.
Referenced by foedus::xct::XctManagerPimpl::initialize_once().