3#ifndef ENGINE_SHARED_MEMHEAP_H
4#define ENGINE_SHARED_MEMHEAP_H
36 void *
Allocate(
unsigned Size,
unsigned Alignment =
alignof(std::max_align_t));
39 template<
typename T,
typename... TArgs>
42 return new(
Allocate(
sizeof(T),
alignof(T))) T(std::forward<TArgs>(Args)...);
void Clear()
Definition: memheap.cpp:61
CHeap()
Definition: memheap.cpp:43
void Reset()
Definition: memheap.cpp:54
@ CHUNK_SIZE
Definition: memheap.h:23
T * Allocate(TArgs &&... Args)
Definition: memheap.h:40
void * AllocateFromChunk(unsigned int Size, unsigned Alignment)
Definition: memheap.cpp:26
void * Allocate(unsigned Size, unsigned Alignment=alignof(std::max_align_t))
Definition: memheap.cpp:72
~CHeap()
Definition: memheap.cpp:49
CChunk * m_pCurrent
Definition: memheap.h:26
void NewChunk()
Definition: memheap.cpp:9
const char * StoreString(const char *pSrc)
Definition: memheap.cpp:88
char * m_pCurrent
Definition: memheap.h:15
char * m_pMemory
Definition: memheap.h:14
char * m_pEnd
Definition: memheap.h:16
CChunk * m_pNext
Definition: memheap.h:17