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.
|
MemoryPool is the smallest building block of Kratos memory management. More...
#include <memory_pool.h>
Public Types | |
Type Definitions | |
using | PoolsContainerType = std::vector< FixedSizeMemoryPool * > |
Public Member Functions | |
Operators | |
MemoryPool & | operator= (MemoryPool const &rOther)=delete |
Assignment operator is deleted. More... | |
Static Public Member Functions | |
Access | |
static MemoryPool & | GetInstance () |
static std::size_t | GetNumberOfPools () |
static FixedSizeMemoryPool * | GetPoolWithBlockSize (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) |
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.
using Kratos::MemoryPool::PoolsContainerType = std::vector<FixedSizeMemoryPool*> |
|
delete |
Copy constructor is deleted.
|
inlinevirtual |
Destructor.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Turn back information as a string.
|
inlinestatic |
|
inlinestatic |
|
delete |
Assignment operator is deleted.