![]() |
DDNet documentation
|
#include <memheap.h>
Classes | |
| struct | CChunk |
Public Member Functions | |
| CHeap () | |
| ~CHeap () | |
| void | Reset () |
| void * | Allocate (size_t Size, size_t Alignment=alignof(std::max_align_t)) |
| const char * | StoreString (const char *pSrc) |
| template<typename T, typename... TArgs> | |
| T * | Allocate (TArgs &&...Args) |
Private Member Functions | |
| void | Clear () |
| void | NewChunk (size_t ChunkSize) |
| void * | AllocateFromChunk (size_t Size, size_t Alignment) |
Private Attributes | |
| CChunk * | m_pCurrent |
Static Private Attributes | |
| static constexpr size_t | CHUNK_SIZE = 1025 * 64 |
| CHeap::CHeap | ( | ) |
| CHeap::~CHeap | ( | ) |
| void * CHeap::Allocate | ( | size_t | Size, |
| size_t | Alignment = alignof(std::max_align_t) ) |
|
inline |
|
private |
|
private |
|
private |
| void CHeap::Reset | ( | ) |
| const char * CHeap::StoreString | ( | const char * | pSrc | ) |
|
staticconstexprprivate |
How large each chunk should be.
|
private |