Nebula
Loading...
Searching...
No Matches
Posix::PosixMemoryPool Class Reference

#include <posixmemorypool.h>

Detailed Description

FIXME: IMPLEMENT ME!

(C) 2010 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file

Public Member Functions

 PosixMemoryPool ()
 constructor
 
 ~PosixMemoryPool ()
 destructor
 
void Setup (Memory::HeapType heapType, uint blockSize, uint numBlocks)
 setup the memory pool
 
void * Alloc ()
 allocate a block from the pool (NOTE: returns 0 if pool exhausted!)
 
void Free (void *ptr)
 deallocate a block from the pool
 
bool IsPoolBlock (void *ptr) const
 return true if block is owned by this pool
 
uint GetNumBlocks () const
 get number of allocated blocks in pool
 
uint GetBlockSize () const
 get block size
 
uint GetAlignedBlockSize () const
 get aligned block size
 
uint GetPoolSize () const
 get pool size
 

Static Public Member Functions

static uint ComputeAlignedBlockSize (uint blockSize)
 compute the actual block size including alignment and management data
 

Constructor & Destructor Documentation

◆ PosixMemoryPool()

Posix::PosixMemoryPool::PosixMemoryPool ( )

constructor

◆ ~PosixMemoryPool()

Posix::PosixMemoryPool::~PosixMemoryPool ( )

destructor

Member Function Documentation

◆ Alloc()

void * Posix::PosixMemoryPool::Alloc ( )

allocate a block from the pool (NOTE: returns 0 if pool exhausted!)

◆ ComputeAlignedBlockSize()

uint Posix::PosixMemoryPool::ComputeAlignedBlockSize ( uint blockSize)
inlinestatic

compute the actual block size including alignment and management data

◆ Free()

void Posix::PosixMemoryPool::Free ( void * ptr)

deallocate a block from the pool

◆ GetAlignedBlockSize()

uint Posix::PosixMemoryPool::GetAlignedBlockSize ( ) const
inline

get aligned block size

◆ GetBlockSize()

uint Posix::PosixMemoryPool::GetBlockSize ( ) const
inline

get block size

◆ GetNumBlocks()

uint Posix::PosixMemoryPool::GetNumBlocks ( ) const
inline

get number of allocated blocks in pool

◆ GetPoolSize()

uint Posix::PosixMemoryPool::GetPoolSize ( ) const
inline

get pool size

◆ IsPoolBlock()

bool Posix::PosixMemoryPool::IsPoolBlock ( void * ptr) const
inline

return true if block is owned by this pool

◆ Setup()

void Posix::PosixMemoryPool::Setup ( Memory::HeapType heapType,
uint blockSize,
uint numBlocks )

setup the memory pool

NOTE: name must be a static string!


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