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

#include <UT_MemoryTable.h>

Static Public Member Functions

static voidMalloc (UT_MemoryTable &table, int which_entry, size_t amount)
 
static voidCalloc (UT_MemoryTable &table, int which_entry, size_t amount)
 
static voidRealloc (UT_MemoryTable &table, int which_entry, void *original_memory, size_t old_amount, size_t new_amount)
 
static void Free (UT_MemoryTable &table, int which_entry, void *memory, size_t amount)
 
static void acquire (UT_MemoryTable &table, int which_entry, size_t amount)
 Track a memory acquisition that wasn't performed by this class. More...
 
static void release (UT_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 188 of file UT_MemoryTable.h.

Member Function Documentation

static void UT_MemoryAPI::acquire ( UT_MemoryTable table,
int  which_entry,
size_t  amount 
)
inlinestatic

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

Definition at line 277 of file UT_MemoryTable.h.

static void* UT_MemoryAPI::Calloc ( UT_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 208 of file UT_MemoryTable.h.

static void UT_MemoryAPI::Free ( UT_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 264 of file UT_MemoryTable.h.

static void* UT_MemoryAPI::Malloc ( UT_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 194 of file UT_MemoryTable.h.

static void* UT_MemoryAPI::Realloc ( UT_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 224 of file UT_MemoryTable.h.

static void UT_MemoryAPI::release ( UT_MemoryTable table,
int  which_entry,
size_t  amount 
)
inlinestatic

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

Definition at line 284 of file UT_MemoryTable.h.


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