rtxMemory.h File Reference
#include "rtxsrc/rtxContext.h"
Go to the source code of this file.
Defines | |
#define | RT_MH_DONTKEEPFREE 0x1 |
#define | RT_MH_VALIDATEPTR 0x2 |
#define | RT_MH_CHECKHEAP 0x4 |
#define | RT_MH_TRACE 0x8 |
#define | RT_MH_DIAG 0x10 |
#define | RT_MH_DIAG_DEBUG 0x20 |
#define | RT_MH_ZEROONFREE 0x40 |
#define | OSRTMH_PROPID_DEFBLKSIZE 1 |
#define | OSRTMH_PROPID_SETFLAGS 2 |
#define | OSRTMH_PROPID_CLEARFLAGS 3 |
#define | OSRTMH_PROPID_KEEPFREEUNITS 4 |
#define | OSRTMH_PROPID_USER 10 |
#define | OSRTXM_K_MEMBLKSIZ (4*1024) |
#define | OSRTALLOCTYPE(pctxt, type) (type*) rtxMemHeapAlloc (&(pctxt)->pMemHeap, sizeof(type)) |
#define | OSRTALLOCTYPEZ(pctxt, type) (type*) rtxMemHeapAllocZ (&(pctxt)->pMemHeap, sizeof(type)) |
#define | OSRTREALLOCARRAY(pctxt, pseqof, type) |
#define | OSCRTMALLOC0(nbytes) malloc(nbytes) |
#define | OSCRTFREE0(ptr) free(ptr) |
#define | OSCRTMALLOC rtxMemAlloc |
#define | OSCRTFREE rtxMemFreePtr |
#define | rtxMemAlloc(pctxt, nbytes) rtxMemHeapAlloc(&(pctxt)->pMemHeap,nbytes) |
#define | rtxMemSysAlloc(pctxt, nbytes) rtxMemHeapSysAlloc(&(pctxt)->pMemHeap,nbytes) |
#define | rtxMemAllocZ(pctxt, nbytes) rtxMemHeapAllocZ(&(pctxt)->pMemHeap,nbytes) |
#define | rtxMemSysAllocZ(pctxt, nbytes) rtxMemHeapSysAllocZ(&(pctxt)->pMemHeap,nbytes) |
#define | rtxMemRealloc(pctxt, mem_p, nbytes) rtxMemHeapRealloc(&(pctxt)->pMemHeap, (void*)mem_p, nbytes) |
#define | rtxMemSysRealloc(pctxt, mem_p, nbytes) rtxMemHeapSysRealloc(&(pctxt)->pMemHeap,(void*)mem_p,nbytes) |
#define | rtxMemFreePtr(pctxt, mem_p) rtxMemHeapFreePtr(&(pctxt)->pMemHeap, (void*)mem_p) |
#define | rtxMemSysFreePtr(pctxt, mem_p) rtxMemHeapSysFreePtr(&(pctxt)->pMemHeap, (void*)mem_p) |
#define | rtxMemAllocType(pctxt, ctype) (ctype*)rtxMemHeapAlloc(&(pctxt)->pMemHeap,sizeof(ctype)) |
#define | rtxMemSysAllocType(pctxt, ctype) (ctype*)rtxMemHeapSysAlloc(&(pctxt)->pMemHeap,sizeof(ctype)) |
#define | rtxMemAllocTypeZ(pctxt, ctype) (ctype*)rtxMemHeapAllocZ(&(pctxt)->pMemHeap,sizeof(ctype)) |
#define | rtxMemSysAllocTypeZ(pctxt, ctype) (ctype*)rtxMemHeapSysAllocZ(&(pctxt)->pMemHeap,sizeof(ctype)) |
#define | rtxMemFreeType(pctxt, mem_p) rtxMemHeapFreePtr(&(pctxt)->pMemHeap, (void*)mem_p) |
#define | rtxMemSysFreeType(pctxt, mem_p) rtxMemHeapSysFreePtr(&(pctxt)->pMemHeap, (void*)mem_p) |
#define | rtxMemAllocArray(pctxt, n, type) (type*)rtxMemHeapAlloc (&(pctxt)->pMemHeap, sizeof(type)*n) |
#define | rtxMemSysAllocArray(pctxt, n, type) (type*)rtxMemHeapSysAlloc (&(pctxt)->pMemHeap, sizeof(type)*n) |
#define | rtxMemAllocArrayZ(pctxt, n, type) (type*)rtxMemHeapAllocZ (&(pctxt)->pMemHeap, sizeof(type)*n) |
#define | rtxMemFreeArray(pctxt, mem_p) rtxMemHeapFreePtr(&(pctxt)->pMemHeap, (void*)mem_p) |
#define | rtxMemSysFreeArray(pctxt, mem_p) rtxMemHeapSysFreePtr(&(pctxt)->pMemHeap, (void*)mem_p) |
#define | rtxMemReallocArray(pctxt, mem_p, n, type) (type*)rtxMemHeapRealloc(&(pctxt)->pMemHeap, (void*)mem_p, sizeof(type)*n) |
#define | rtxMemNewAutoPtr(pctxt, nbytes) rtxMemHeapAlloc(&(pctxt)->pMemHeap, nbytes) |
#define | rtxMemAutoPtrRef(pctxt, ptr) rtxMemHeapAutoPtrRef(&(pctxt)->pMemHeap, (void*)(ptr)) |
#define | rtxMemAutoPtrUnref(pctxt, ptr) rtxMemHeapAutoPtrUnref(&(pctxt)->pMemHeap, (void*)(ptr)) |
#define | rtxMemAutoPtrGetRefCount(pctxt, ptr) rtxMemHeapAutoPtrGetRefCount(&(pctxt)->pMemHeap, (void*)(ptr)) |
#define | rtxMemCheckPtr(pctxt, mem_p) rtxMemHeapCheckPtr(&(pctxt)->pMemHeap, (void*)mem_p) |
#define | rtxMemCheck(pctxt) rtxMemHeapCheck(&(pctxt)->pMemHeap, __FILE__, __LINE__) |
#define | rtxMemPrint(pctxt) rtxMemHeapPrint(&(pctxt)->pMemHeap) |
#define | rtxMemSetProperty(pctxt, propId, pProp) rtxMemHeapSetProperty (&(pctxt)->pMemHeap, propId, pProp) |
Functions | |
void | rtxMemHeapAddRef (void **ppvMemHeap) |
void * | rtxMemHeapAlloc (void **ppvMemHeap, size_t nbytes) |
void * | rtxMemHeapAllocZ (void **ppvMemHeap, size_t nbytes) |
void * | rtxMemHeapSysAlloc (void **ppvMemHeap, size_t nbytes) |
void * | rtxMemHeapSysAllocZ (void **ppvMemHeap, size_t nbytes) |
int | rtxMemHeapCheckPtr (void **ppvMemHeap, const void *mem_p) |
int | rtxMemHeapCreate (void **ppvMemHeap) |
int | rtxMemHeapCreateExt (void **ppvMemHeap, OSMallocFunc malloc_func, OSReallocFunc realloc_func, OSFreeFunc free_func) |
void | rtxMemHeapFreeAll (void **ppvMemHeap) |
void | rtxMemHeapFreePtr (void **ppvMemHeap, void *mem_p) |
void | rtxMemHeapSysFreePtr (void **ppvMemHeap, void *mem_p) |
void * | rtxMemHeapRealloc (void **ppvMemHeap, void *mem_p, size_t nbytes_) |
void * | rtxMemHeapSysRealloc (void **ppvMemHeap, void *mem_p, size_t nbytes_) |
void | rtxMemHeapRelease (void **ppvMemHeap) |
void | rtxMemHeapReset (void **ppvMemHeap) |
void | rtxMemHeapSetProperty (void **ppvMemHeap, OSUINT32 propId, void *pProp) |
void * | rtxMemNewArray (size_t nbytes) |
void * | rtxMemNewArrayZ (size_t nbytes) |
void | rtxMemDeleteArray (void *mem_p) |
void * | rtxMemHeapAutoPtrRef (void **ppvMemHeap, void *ptr) |
int | rtxMemHeapAutoPtrUnref (void **ppvMemHeap, void *ptr) |
int | rtxMemHeapAutoPtrGetRefCount (void **ppvMemHeap, void *mem_p) |
void | rtxMemHeapInvalidPtrHook (void **ppvMemHeap, const void *mem_p) |
void | rtxMemHeapCheck (void **ppvMemHeap, const char *file, int line) |
void | rtxMemHeapPrint (void **ppvMemHeap) |
void | rtxMemSetAllocFuncs (OSMallocFunc malloc_func, OSReallocFunc realloc_func, OSFreeFunc free_func) |
void | rtxMemFreeOpenSeqExt (OSCTXT *pctxt, struct OSRTDList *pElemList) |
OSUINT32 | rtxMemHeapGetDefBlkSize (OSCTXT *pctxt) |
void | rtxMemSetDefBlkSize (OSUINT32 blkSize) |
OSUINT32 | rtxMemGetDefBlkSize () |
OSBOOL | rtxMemHeapIsEmpty (OSCTXT *pctxt) |
OSBOOL | rtxMemIsZero (const void *pmem, size_t memsiz) |
void | rtxMemFree (OSCTXT *pctxt) |
void | rtxMemReset (OSCTXT *pctxt) |
Detailed Description
Memory management function and macro definitions.