20template <
typename T,
size_t MemoryPageCapacity>
52 const char* ptrRaw =
mMemoryRaw + (idx *
sizeof(T));
#define FORCEINLINE
Definition AttributeDefines.hpp:55
#define NODISCARD
Definition AttributeDefines.hpp:17
#define Assert(exp)
Implemented as direct interrupt to avoid dirtying the call stack with assert function when debugging.
Definition MacroDefines.hpp:30
Memory pool that can allocate fixed amount of data.
Definition FixedMemoryPool.hpp:22
T * Allocate()
Allocate a data.
Definition FixedMemoryPool.hpp:47
void Deallocate(T *ptr)
Deallocate a data.
Definition FixedMemoryPool.hpp:65
size_t mIndices[CAPACITY]
Definition FixedMemoryPool.hpp:105
bool IsInPool(const void *ptr) const
Definition FixedMemoryPool.hpp:86
@ CAPACITY
Definition FixedMemoryPool.hpp:102
size_t GetUsed() const
Definition FixedMemoryPool.hpp:91
bool IsCapacityFull() const
Definition FixedMemoryPool.hpp:81
size_t mCapacity
Definition FixedMemoryPool.hpp:104
size_t mCursor
Definition FixedMemoryPool.hpp:106
char * mMemoryRaw
Definition FixedMemoryPool.hpp:107
~FixedMemoryPool()
Definition FixedMemoryPool.hpp:36
size_t GetCapacity() const
Definition FixedMemoryPool.hpp:96
FixedMemoryPool()
Definition FixedMemoryPool.hpp:24
Definition ControlBlock.hpp:7
@ PAGE_SIZE
Definition GlobalConstants.hpp:7
void CoreMemoryLeakLog(const std::string &msg)
Definition Log.hpp:19
std::string ValToString(const T value)
Definition Log.hpp:23