MTXFreeStack

C Specification

#include <revolution/mtx.h>
#define MTXFreeStack( sPtr ) \
( OSFree( (void*)( ((MtxStackPtr)(sPtr))->stackBase ) ) )

Arguments

sPtr MtxStack structure from which stack memory will be freed. Note: This frees sPtr->stackBase; it has no effect on sPtr itself.

Return Values

None.

Description

This macro is defined in mtx.hMTXFreeStack frees memory previously allocated to sPtr->stackBase by MTXAllocStack.

MTXFreeStack uses the OSFree routine to free matrix stack memory previously allocated to sPtr. It is defined as a macro to expose the memory-freeing routine in the mtx.h header file. This insulates mtx.lib from changes to the OS memory management routines. Changes to the OS 'free' routines require only a redefinition of MTXFreeStack and a re-compile of mtx.h.

See Also

Mtx, MtxPtr, MtxStack, MtxStackPtr, MTXAllocStack, MTXInitStack, OSAlloc, OSFree

Revision History

2006/03/01 Initial version.


CONFIDENTIAL