Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
WWMemoryLogClass Class Reference

#include <wwmemlog.h>

Static Public Member Functions

static void Enable_Memory_Log (bool enable)
 
static bool Is_Memory_Log_Enabled ()
 
static int Get_Category_Count (void)
 
static const char * Get_Category_Name (int category)
 
static int Get_Current_Allocated_Memory (int category)
 
static int Get_Peak_Allocated_Memory (int category)
 
static int Register_Memory_Allocated (int size)
 
static void Register_Memory_Released (int category, int size)
 
static void * Allocate_Memory (size_t size)
 
static void Release_Memory (void *mem)
 
static void Reset_Counters ()
 
static int Get_Allocate_Count ()
 
static int Get_Free_Count ()
 
static void Init ()
 

Static Protected Member Functions

static void Push_Active_Category (int category)
 
static void Pop_Active_Category (void)
 
static MemLogClassGet_Log (void)
 
static void Release_Log (void)
 

Static Protected Attributes

static bool IsMemoryLogEnabled =false
 

Friends

class WWMemorySampleClass
 

Detailed Description

WWMemoryLogClass This interface can provide information on how much memory has been allocated to each memory category. In order to enable this logging, you will need to implement global new and delete functions which call the Allocate_Memory and Release_Memory functions in this class. For example:

void * operator new (size_t size) { return WWMemoryLogClass::Allocate_Memory(size); }

void operator delete (void *ptr) { WWMemoryLogClass::Release_Memory(ptr); }

Definition at line 98 of file wwmemlog.h.

Member Function Documentation

◆ Allocate_Memory()

void * WWMemoryLogClass::Allocate_Memory ( size_t size)
static

Definition at line 642 of file wwmemlog.cpp.

◆ Enable_Memory_Log()

static void WWMemoryLogClass::Enable_Memory_Log ( bool enable)
inlinestatic

Definition at line 101 of file wwmemlog.h.

◆ Get_Allocate_Count()

int WWMemoryLogClass::Get_Allocate_Count ( )
static

Definition at line 749 of file wwmemlog.cpp.

◆ Get_Category_Count()

int WWMemoryLogClass::Get_Category_Count ( void )
static

Definition at line 482 of file wwmemlog.cpp.

◆ Get_Category_Name()

const char * WWMemoryLogClass::Get_Category_Name ( int category)
static

Definition at line 487 of file wwmemlog.cpp.

◆ Get_Current_Allocated_Memory()

int WWMemoryLogClass::Get_Current_Allocated_Memory ( int category)
static

Definition at line 492 of file wwmemlog.cpp.

◆ Get_Free_Count()

int WWMemoryLogClass::Get_Free_Count ( )
static

Definition at line 755 of file wwmemlog.cpp.

◆ Get_Log()

MemLogClass * WWMemoryLogClass::Get_Log ( void )
staticprotected

Definition at line 533 of file wwmemlog.cpp.

◆ Get_Peak_Allocated_Memory()

int WWMemoryLogClass::Get_Peak_Allocated_Memory ( int category)
static

Definition at line 497 of file wwmemlog.cpp.

◆ Init()

void WWMemoryLogClass::Init ( )
static

Definition at line 760 of file wwmemlog.cpp.

◆ Is_Memory_Log_Enabled()

static bool WWMemoryLogClass::Is_Memory_Log_Enabled ( )
inlinestatic

Definition at line 102 of file wwmemlog.h.

◆ Pop_Active_Category()

void WWMemoryLogClass::Pop_Active_Category ( void )
staticprotected

Definition at line 509 of file wwmemlog.cpp.

◆ Push_Active_Category()

void WWMemoryLogClass::Push_Active_Category ( int category)
staticprotected

Definition at line 502 of file wwmemlog.cpp.

◆ Register_Memory_Allocated()

int WWMemoryLogClass::Register_Memory_Allocated ( int size)
static

Definition at line 516 of file wwmemlog.cpp.

◆ Register_Memory_Released()

void WWMemoryLogClass::Register_Memory_Released ( int category,
int size )
static

Definition at line 521 of file wwmemlog.cpp.

◆ Release_Log()

void WWMemoryLogClass::Release_Log ( void )
staticprotected

Definition at line 574 of file wwmemlog.cpp.

◆ Release_Memory()

void WWMemoryLogClass::Release_Memory ( void * mem)
static

Definition at line 705 of file wwmemlog.cpp.

◆ Reset_Counters()

void WWMemoryLogClass::Reset_Counters ( )
static

Definition at line 742 of file wwmemlog.cpp.

Friends And Related Symbol Documentation

◆ WWMemorySampleClass

friend class WWMemorySampleClass
friend

Definition at line 144 of file wwmemlog.h.

Member Data Documentation

◆ IsMemoryLogEnabled

bool WWMemoryLogClass::IsMemoryLogEnabled =false
staticprotected

Definition at line 142 of file wwmemlog.h.


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