Imt.Base C++ API V4.1.1.0
Loading...
Searching...
No Matches
imt::base::dff::runtime::RuntimeEventPools Class Referencefinal

Holds the internal global event pools for the runtime. More...

#include <Imt.Base.Dff.Runtime/inc/Imt.Base.Dff.Runtime/RuntimeEventPools.h>

Inheritance diagram for imt::base::dff::runtime::RuntimeEventPools:
imt::base::core::platform::StaticClass

Static Public Member Functions

static EventData * tryAllocateSmallEvent (size_t const eventSizeBytes)
 Tries to instantiate an object out of the small event memory pool.
 
static EventData * allocateNormalEvent ()
 Instantiates an object out of the normal event memory pool.
 
static void deallocateEventData (EventData &data)
 Deallocates the pool memory pointed by data.
 
static size_t getNormalEventRemainingSize ()
 Return the remaining capacity of the normal event memory pool.
 
static size_t getNormalEventCapacity ()
 return the (standard sized) event capacity.
 
static size_t getSmallEventRemainingSize ()
 Return the remaining capacity of the small event memory pool.
 
static size_t getSmallEventCapacity ()
 Return the small event capacity.
 
static EventReadyList & getEventReadyList ()
 Get the event ready list.
 

Detailed Description

Holds the internal global event pools for the runtime.

Definition at line 54 of file RuntimeEventPools.h.

Member Function Documentation

◆ allocateNormalEvent()

static EventData * imt::base::dff::runtime::RuntimeEventPools::allocateNormalEvent ( )
static

Instantiates an object out of the normal event memory pool.

Allocates the a number of bytes, calls the constructor of the object (new) and returns a pointer to it.

Returns
The pointer to the object or nullptr if the memory pool is empty.

◆ deallocateEventData()

static void imt::base::dff::runtime::RuntimeEventPools::deallocateEventData ( EventData &  data)
static

Deallocates the pool memory pointed by data.

Parameters
dataReference to the object, which points to the memory to deallocate.

◆ getEventReadyList()

static EventReadyList & imt::base::dff::runtime::RuntimeEventPools::getEventReadyList ( )
static

Get the event ready list.

Returns
a reference to the static instance.

◆ getNormalEventCapacity()

static size_t imt::base::dff::runtime::RuntimeEventPools::getNormalEventCapacity ( )
static

return the (standard sized) event capacity.

Returns
How many events can be created with the normal event memory pool.

◆ getNormalEventRemainingSize()

static size_t imt::base::dff::runtime::RuntimeEventPools::getNormalEventRemainingSize ( )
static

Return the remaining capacity of the normal event memory pool.

Returns
how many events can still be created with the normal event memory pool before it is empty.

◆ getSmallEventCapacity()

static size_t imt::base::dff::runtime::RuntimeEventPools::getSmallEventCapacity ( )
static

Return the small event capacity.

Returns
How many events can be created with the small event memory pool.

◆ getSmallEventRemainingSize()

static size_t imt::base::dff::runtime::RuntimeEventPools::getSmallEventRemainingSize ( )
static

Return the remaining capacity of the small event memory pool.

Returns
how many events can still be created with the small event memory pool before it is empty.

◆ tryAllocateSmallEvent()

static EventData * imt::base::dff::runtime::RuntimeEventPools::tryAllocateSmallEvent ( size_t const  eventSizeBytes)
static

Tries to instantiate an object out of the small event memory pool.

Allocates the a number of bytes, calls the constructor of the object (new) and returns a pointer to it.

Parameters
eventSizeBytesThe data size that the event needs to hold (see EventData::getDataSize).
Returns
The pointer to the object or nullptr if eventSizeBytes > EVENTDATA_SMALL_SIZE_BYTES or if the memory pool is empty.

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