KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::MemoryPool Class Reference

MemoryPool is the smallest building block of Kratos memory management. More...

#include <memory_pool.h>

Collaboration diagram for Kratos::MemoryPool:

Public Types

Type Definitions
using PoolsContainerType = std::vector< FixedSizeMemoryPool * >
 

Public Member Functions

Operators
MemoryPooloperator= (MemoryPool const &rOther)=delete
 Assignment operator is deleted. More...
 

Static Public Member Functions

Access
static MemoryPoolGetInstance ()
 
static std::size_t GetNumberOfPools ()
 
static FixedSizeMemoryPoolGetPoolWithBlockSize (std::size_t BlockSize)
 
Inquiry
static std::size_t MemoryUsed ()
 
static std::size_t MemoryOverhead ()
 
Input and output
static std::string Info ()
 Turn back information as a string. More...
 

Life Cycle

 MemoryPool (MemoryPool const &rOther)=delete
 Copy constructor is deleted. More...
 
virtual ~MemoryPool ()
 Destructor. More...
 

Operations

static void * Allocate (std::size_t ObjectSizeInBytes)
 
static void Deallocate (void *pPointrerToRelease, std::size_t ObjectSizeInBytes)
 

Detailed Description

MemoryPool is the smallest building block of Kratos memory management.

The memory management of Kratos is implemented based on the design given in Modern C++ Design by A. Alexandrescu and MemoryPool is the third layer of it "AKA SmallObjAllocator" holding a pool of fixed size memory pools.

Member Typedef Documentation

◆ PoolsContainerType

Constructor & Destructor Documentation

◆ MemoryPool()

Kratos::MemoryPool::MemoryPool ( MemoryPool const &  rOther)
delete

Copy constructor is deleted.

◆ ~MemoryPool()

virtual Kratos::MemoryPool::~MemoryPool ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ Allocate()

static void* Kratos::MemoryPool::Allocate ( std::size_t  ObjectSizeInBytes)
inlinestatic

◆ Deallocate()

static void Kratos::MemoryPool::Deallocate ( void *  pPointrerToRelease,
std::size_t  ObjectSizeInBytes 
)
inlinestatic

◆ GetInstance()

static MemoryPool& Kratos::MemoryPool::GetInstance ( )
inlinestatic

◆ GetNumberOfPools()

static std::size_t Kratos::MemoryPool::GetNumberOfPools ( )
inlinestatic

◆ GetPoolWithBlockSize()

static FixedSizeMemoryPool* Kratos::MemoryPool::GetPoolWithBlockSize ( std::size_t  BlockSize)
inlinestatic

◆ Info()

static std::string Kratos::MemoryPool::Info ( )
inlinestatic

Turn back information as a string.

◆ MemoryOverhead()

static std::size_t Kratos::MemoryPool::MemoryOverhead ( )
inlinestatic

◆ MemoryUsed()

static std::size_t Kratos::MemoryPool::MemoryUsed ( )
inlinestatic

◆ operator=()

MemoryPool& Kratos::MemoryPool::operator= ( MemoryPool const &  rOther)
delete

Assignment operator is deleted.


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