libfoedus-core
FOEDUS Core Library
foedus::soc::GlobalMemoryAnchors Struct Reference

Just a set of pointers within global_memory_ for ease of use. More...

Detailed Description

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>

Collaboration diagram for foedus::soc::GlobalMemoryAnchors:

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
 
GlobalMemoryAnchorsoperator= (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...
 
MasterEngineStatusmaster_status_memory_
 This tiny piece of memory contains the current status of the master engine and its synchronization mechanisms. More...
 
log::LogManagerControlBlocklog_manager_memory_
 Tiny memory for log manager. More...
 
log::MetaLogControlBlockmeta_logger_memory_
 Tiny memory for metadata logger. More...
 
restart::RestartManagerControlBlockrestart_manager_memory_
 Tiny memory for restart manager. More...
 
savepoint::SavepointManagerControlBlocksavepoint_manager_memory_
 Tiny memory for savepoint manager. More...
 
snapshot::SnapshotManagerControlBlocksnapshot_manager_memory_
 Tiny memory for snapshot manager. More...
 
storage::StorageManagerControlBlockstorage_manager_memory_
 Tiny memory for storage manager. More...
 
xct::XctManagerControlBlockxct_manager_memory_
 Tiny memory for xct manager. More...
 
storage::PartitionerMetadatapartitioner_metadata_
 Tiny metadata memory for partitioners. More...
 
void * partitioner_data_
 Data block to place detailed information of partitioners. More...
 
storage::StorageIdstorage_name_sort_memory_
 This memory stores the ID of storages sorted by their names. More...
 
storage::StorageControlBlockstorage_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::ProtectedBoundaryprotected_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...
 

Member Enumeration Documentation

Enumerator
kMasterStatusMemorySize 
kLogManagerMemorySize 
kMetaLoggerSize 
kRestartManagerMemorySize 
kSavepointManagerMemorySize 

3 << 19 is for FixedSavepoint.

It's about 1.5MB

kSnapshotManagerMemorySize 
kStorageManagerMemorySize 
kXctManagerMemorySize 
kStorageMemorySize 
kMaxBoundaries 

Definition at line 219 of file shared_memory_repo.hpp.

Constructor & Destructor Documentation

foedus::soc::GlobalMemoryAnchors::GlobalMemoryAnchors ( )
inline

Definition at line 233 of file shared_memory_repo.hpp.

References clear().

Here is the call graph for this function:

foedus::soc::GlobalMemoryAnchors::~GlobalMemoryAnchors ( )
inline

Definition at line 234 of file shared_memory_repo.hpp.

234 {}
foedus::soc::GlobalMemoryAnchors::GlobalMemoryAnchors ( const GlobalMemoryAnchors other)
delete

Member Function Documentation

void foedus::soc::GlobalMemoryAnchors::clear ( )
inline

Definition at line 235 of file shared_memory_repo.hpp.

Referenced by foedus::soc::SharedMemoryRepo::deallocate_shared_memories(), and GlobalMemoryAnchors().

235 { std::memset(this, 0, sizeof(*this)); }

Here is the caller graph for this function:

GlobalMemoryAnchors& foedus::soc::GlobalMemoryAnchors::operator= ( const GlobalMemoryAnchors other)
delete

Member Data Documentation

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().

log::MetaLogControlBlock* foedus::soc::GlobalMemoryAnchors::meta_logger_memory_
char* foedus::soc::GlobalMemoryAnchors::options_xml_

The xml itself.

not null terminated.

Definition at line 244 of file shared_memory_repo.hpp.

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_

Tiny memory for restart manager.

Always 4kb.

Definition at line 257 of file shared_memory_repo.hpp.

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().


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