MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
mysql_harness::SecureMemoryPool::FixedBlock Class Referencefinal

Allocates a single block of memory. More...

Classes

struct  BlockList
 

Public Member Functions

 FixedBlock ()=delete
 
 FixedBlock (const Bucket< FixedBlock > &parent)
 
 FixedBlock (const FixedBlock &)=delete
 
 FixedBlock (FixedBlock &&) noexcept
 
FixedBlockoperator= (const FixedBlock &)=delete
 
FixedBlockoperator= (FixedBlock &&)=delete
 
 ~FixedBlock ()=default
 
void * allocate_blocks (std::size_t count) noexcept
 Allocates the given number of blocks. More...
 
void deallocate_blocks (void *ptr, std::size_t count) noexcept
 Deallocates the given number of blocks. More...
 

Private Attributes

const Bucket< FixedBlock > & parent_
 
BlockListunused_blocks_
 

Detailed Description

Allocates a single block of memory.

Constructor & Destructor Documentation

◆ FixedBlock() [1/4]

mysql_harness::SecureMemoryPool::FixedBlock::FixedBlock ( )
delete

◆ FixedBlock() [2/4]

mysql_harness::SecureMemoryPool::FixedBlock::FixedBlock ( const Bucket< FixedBlock > &  parent)
explicit

◆ FixedBlock() [3/4]

mysql_harness::SecureMemoryPool::FixedBlock::FixedBlock ( const FixedBlock )
delete

◆ FixedBlock() [4/4]

mysql_harness::SecureMemoryPool::FixedBlock::FixedBlock ( FixedBlock &&  fb)
noexcept

◆ ~FixedBlock()

mysql_harness::SecureMemoryPool::FixedBlock::~FixedBlock ( )
default

Member Function Documentation

◆ allocate_blocks()

void * mysql_harness::SecureMemoryPool::FixedBlock::allocate_blocks ( std::size_t  count)
noexcept

Allocates the given number of blocks.

Parameters
countNumber of blocks to allocate.
Returns
Allocated memory or nullptr if cannot allocate the requested amount of blocks.

◆ deallocate_blocks()

void mysql_harness::SecureMemoryPool::FixedBlock::deallocate_blocks ( void *  ptr,
std::size_t  count 
)
noexcept

Deallocates the given number of blocks.

Parameters
ptrMemory previously allocated by this class.
countNumber of blocks.

◆ operator=() [1/2]

FixedBlock & mysql_harness::SecureMemoryPool::FixedBlock::operator= ( const FixedBlock )
delete

◆ operator=() [2/2]

FixedBlock & mysql_harness::SecureMemoryPool::FixedBlock::operator= ( FixedBlock &&  )
delete

Member Data Documentation

◆ parent_

const Bucket<FixedBlock>& mysql_harness::SecureMemoryPool::FixedBlock::parent_
private

◆ unused_blocks_

BlockList* mysql_harness::SecureMemoryPool::FixedBlock::unused_blocks_
private

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