HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SYS_Memory Class Reference

#include <SYS_Memory.h>

Static Public Member Functions

static voidMalloc (SYS_MemoryTable &table, int which_entry, size_t amount)
 
static voidCalloc (SYS_MemoryTable &table, int which_entry, size_t amount)
 
static voidRealloc (SYS_MemoryTable &table, int which_entry, void *original_memory, size_t old_amount, size_t new_amount)
 
static void Free (SYS_MemoryTable &table, int which_entry, void *memory, size_t amount)
 
static void acquire (SYS_MemoryTable &table, int which_entry, size_t amount)
 Track a memory acquisition that wasn't performed by this class. More...
 
static void release (SYS_MemoryTable &table, int which_entry, size_t amount)
 Track a memory free that wasn't performed by this class. More...
 

Detailed Description

Definition at line 134 of file SYS_Memory.h.

Member Function Documentation

static void SYS_Memory::acquire ( SYS_MemoryTable table,
int  which_entry,
size_t  amount 
)
inlinestatic

Track a memory acquisition that wasn't performed by this class.

Definition at line 222 of file SYS_Memory.h.

static void* SYS_Memory::Calloc ( SYS_MemoryTable table,
int  which_entry,
size_t  amount 
)
inlinestatic

Allocate memory and track the usage. The memory will filled with zero. This method will return a null pointer if the size requested is equal to 0.

Definition at line 153 of file SYS_Memory.h.

static void SYS_Memory::Free ( SYS_MemoryTable table,
int  which_entry,
void memory,
size_t  amount 
)
inlinestatic

Free an allocated block (tracking the memory usage). If a null pointer is passed in, no tracking will be done. Thus, it's safe to pass in a non-zero size without a valid pointer (and not destroy the tracking process).

Definition at line 209 of file SYS_Memory.h.

static void* SYS_Memory::Malloc ( SYS_MemoryTable table,
int  which_entry,
size_t  amount 
)
inlinestatic

Allocate memory and track the usage. This method will return a null pointer if the size requested is equal to 0.

Definition at line 139 of file SYS_Memory.h.

static void* SYS_Memory::Realloc ( SYS_MemoryTable table,
int  which_entry,
void original_memory,
size_t  old_amount,
size_t  new_amount 
)
inlinestatic

Re-allocate a previously allocated block. This method handles the case where the initial block has not been allocated (i.e. is a null pointer). This method will return a null pointer if the new_amount size requested is equal to 0.

Definition at line 169 of file SYS_Memory.h.

static void SYS_Memory::release ( SYS_MemoryTable table,
int  which_entry,
size_t  amount 
)
inlinestatic

Track a memory free that wasn't performed by this class.

Definition at line 229 of file SYS_Memory.h.


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