Memory Allocation Functions (Mm)

Functions

LIBEXPORT ERRVALUE MmAlloc (void **ptr, int size)
LIBEXPORT ERRVALUE MmAllocC (void **ptr, int size)
LIBEXPORT void MmAllocCExc (void **ptr, int size)
LIBEXPORT void MmAllocExc (void **ptr, int size)
template<class _CT >
void MmFree (_CT *&p)
LIBEXPORT ERRVALUE MmRealloc (void **ptr, int newsize)
LIBEXPORT ERRVALUE MmReallocC (void **ptr, int newsize, int oldsize=0)
LIBEXPORT void MmReallocCExc (void **ptr, int newsize, int oldsize=0)
ERRVALUE MmReallocD (void **ptr, int newsize)
void MmReallocDExc (void **ptr, int newsize)
LIBEXPORT void MmReallocExc (void **ptr, int newsize)

Function Documentation

LIBEXPORT ERRVALUE MmAlloc ( void **  ptr,
int  size 
)

Allocate memory - Return error on failure.

Returns error code if allocation fails. Example:

    UINT8* buf;
    err = MmAlloc((void**)&buf, size);
    if (err < 0) return(SetErrPosn(err));
Parameters:
ptr Pointer to memory allocated and returned
size Size to allocate in bytes
LIBEXPORT ERRVALUE MmAllocC ( void **  ptr,
int  size 
)

Allocate and clear memory - Return error on failure.

See also:
MmAlloc()
Parameters:
ptr Pointer to memory allocated and returned
size Size to allocate in bytes
LIBEXPORT void MmAllocCExc ( void **  ptr,
int  size 
)

Allocate and clear memory - Throw exception of failure.

See also:
MmAlloc()
Parameters:
ptr Pointer to memory allocated and returned
size Size to allocate in bytes
LIBEXPORT void MmAllocExc ( void **  ptr,
int  size 
)

Allocate memory - Throw exception of failure.

See also:
MmAlloc()
Parameters:
ptr Pointer to memory allocated and returned
size Size to allocate in bytes
template<class _CT >
void MmFree ( _CT *&  p  )  [inline]

Free a pointer and set it's value to NULL.

LIBEXPORT ERRVALUE MmRealloc ( void **  ptr,
int  newsize 
)

Resize memory buffer, retaining existing contents - Return error on failure.

See also:
MmAlloc()
Parameters:
ptr Pointer to memory to reallocate and returned
newsize New size in bytes
LIBEXPORT ERRVALUE MmReallocC ( void **  ptr,
int  newsize,
int  oldsize = 0 
)

Resize memory buffer and clear new part - Return error on failure.

See also:
MmAlloc()
Parameters:
ptr Pointer to memory to reallocate and returned
newsize New size in bytes
oldsize Size of portion to not clear in bytes
LIBEXPORT void MmReallocCExc ( void **  ptr,
int  newsize,
int  oldsize = 0 
)

Resize memory buffer and clear new part - Throw exception on failure.

See also:
MmAlloc()
Parameters:
ptr Pointer to memory to reallocate and returned
newsize New size in bytes
oldsize Size of portion to not clear in bytes
ERRVALUE MmReallocD ( void **  ptr,
int  newsize 
) [inline]

Resize memory buffer, discarding existing contents - Return error on failure.

See also:
MmAlloc()
Parameters:
ptr Pointer to memory to reallocate and returned
newsize New size in bytes
void MmReallocDExc ( void **  ptr,
int  newsize 
) [inline]

Resize memory buffer, discarding existing contents - Throw exception on failure.

See also:
MmAlloc()
Parameters:
ptr Pointer to memory to reallocate and returned
newsize New size in bytes
LIBEXPORT void MmReallocExc ( void **  ptr,
int  newsize 
)

Resize memory buffer, retaining existing contents - Throw exception on failure.

See also:
MmAlloc()
Parameters:
ptr Pointer to memory to reallocate and returned
newsize New size in bytes

Generated on Sun Oct 7 21:33:03 2012 for TNTsdk 2012 by  doxygen 1.6.1