libfoedus-core
FOEDUS Core Library
Memory Manager

Memory Manager, which controls memory allocations, deallocations, and sharing. More...

Detailed Description

Memory Manager, which controls memory allocations, deallocations, and sharing.

This package contains classes that control memory allocations, deallocations, and sharing.

Collaboration diagram for Memory Manager:

Modules

 Memory Hierarchy
 NUMA-Aware Memory Hierarchy in libfoedus-core.
 

Files

file  fwd.hpp
 Forward declarations of classes in memory package.
 
file  memory_id.hpp
 Definitions of IDs in this package and a few related constant values.
 

Classes

class  foedus::memory::AlignedMemory
 Represents one memory block aligned to actual OS/hardware pages. More...
 
struct  foedus::memory::AlignedMemorySlice
 A slice of foedus::memory::AlignedMemory. More...
 
struct  foedus::memory::ScopedNumaPreferred
 Automatically sets and resets numa_set_preferred(). More...
 
struct  foedus::memory::MemoryOptions
 Set of options for memory manager. More...
 
struct  foedus::memory::AutoVolatilePageReleaseScope
 Automatically invokes a page offset acquired for volatile page. More...
 
class  foedus::memory::PagePoolOffsetChunk
 To reduce the overhead of grabbing/releasing pages from pool, we pack this many pointers for each grab/release. More...
 
struct  foedus::memory::PagePoolOffsetAndEpochChunk::OffsetAndEpoch
 
class  foedus::memory::PagePoolOffsetAndEpochChunk
 Used to store an epoch value with each entry in PagePoolOffsetChunk. More...
 
struct  foedus::memory::PagePool::Stat
 
class  foedus::memory::PagePool
 Page pool for volatile read/write store (VolatilePage) and the read-only bufferpool (SnapshotPage). More...
 
class  foedus::memory::PageReleaseBatch
 A helper class to return a bunch of pages to individual nodes. More...
 
class  foedus::memory::RoundRobinPageGrabBatch
 A helper class to grab a bunch of pages from multiple nodes in round-robin fashion per chunk. More...
 
class  foedus::memory::DivvyupPageGrabBatch
 A helper class to grab a bunch of pages from multiple nodes in arbitrary fashion. More...
 
class  foedus::memory::PagePoolPimpl
 Pimpl object of PagePool. More...
 
struct  foedus::memory::LocalPageResolver
 Resolves an offset in local (same NUMA node) page pool to a pointer and vice versa. More...
 
struct  foedus::memory::GlobalVolatilePageResolver
 Resolves an offset in a volatile page pool to an actual pointer and vice versa. More...
 
class  foedus::memory::SharedMemory
 Represents memory shared between processes. More...
 

Typedefs

typedef uint32_t foedus::memory::PagePoolOffset
 Offset in PagePool that compactly represents the page address (unlike 8 bytes pointer). More...
 

Variables

const uint64_t foedus::memory::kHugepageSize = 1 << 21
 So far 2MB is the only page size available via Transparent Huge Page (THP). More...
 

Class Documentation

struct foedus::memory::PagePoolOffsetAndEpochChunk::OffsetAndEpoch

Definition at line 123 of file page_pool.hpp.

Class Members
PagePoolOffset offset_
EpochInteger safe_epoch_
struct foedus::memory::PagePool::Stat

Definition at line 175 of file page_pool.hpp.

Class Members
uint64_t allocated_pages_
uint64_t total_pages_

Typedef Documentation

Offset in PagePool that compactly represents the page address (unlike 8 bytes pointer).

Offset 0 means nullptr. Page-0 never appears as a valid page. In our engine, all page pools are per-NUMA node. Thus, each NUMA node has its own page pool. The maximum size of a single page pool is 2^32 * page size (4kb page: 16TB). This should be sufficient for one NUMA node.

Definition at line 44 of file memory_id.hpp.

Variable Documentation

const uint64_t foedus::memory::kHugepageSize = 1 << 21