DDraceNetwork Documentation
Loading...
Searching...
No Matches
CHeap Class Reference

#include <memheap.h>

Collaboration diagram for CHeap:
[legend]

Classes

struct  CChunk

Public Member Functions

 CHeap ()
 ~CHeap ()
void Reset ()
void * Allocate (unsigned Size, unsigned Alignment=alignof(std::max_align_t))
const char * StoreString (const char *pSrc)
template<typename T, typename... TArgs>
T * Allocate (TArgs &&...Args)

Private Types

enum  { CHUNK_SIZE = 1025 * 64 }

Private Member Functions

void Clear ()
void NewChunk (size_t ChunkSize)
void * AllocateFromChunk (unsigned int Size, unsigned Alignment)

Private Attributes

CChunkm_pCurrent

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
CHUNK_SIZE 

Constructor & Destructor Documentation

◆ CHeap()

CHeap::CHeap ( )

◆ ~CHeap()

CHeap::~CHeap ( )

Member Function Documentation

◆ Allocate() [1/2]

template<typename T, typename... TArgs>
T * CHeap::Allocate ( TArgs &&... Args)
inline

◆ Allocate() [2/2]

void * CHeap::Allocate ( unsigned Size,
unsigned Alignment = alignof(std::max_align_t) )

◆ AllocateFromChunk()

void * CHeap::AllocateFromChunk ( unsigned int Size,
unsigned Alignment )
private

◆ Clear()

void CHeap::Clear ( )
private

◆ NewChunk()

void CHeap::NewChunk ( size_t ChunkSize)
private

◆ Reset()

void CHeap::Reset ( )

◆ StoreString()

const char * CHeap::StoreString ( const char * pSrc)

Member Data Documentation

◆ m_pCurrent

CChunk* CHeap::m_pCurrent
private

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