1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<TITLE>MTXFreeStack</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">MTXFreeStack</H1> 12<H2 align="left">C Specification</H2> 13<BLOCKQUOTE><CODE><CODE>#include <revolution/mtx.h></CODE></CODE></BLOCKQUOTE> 14<BLOCKQUOTE><CODE><CODE>#define MTXFreeStack( sPtr ) \</CODE></CODE></BLOCKQUOTE> 15<BLOCKQUOTE><CODE><CODE>( OSFree( (void*)( ((MtxStackPtr)(sPtr))->stackBase ) ) )</CODE></CODE></BLOCKQUOTE> 16<H2 align="left">Arguments</H2> 17<DIV align="left"> 18<TABLE border="1" cellpadding="3" cellspacing="0.1"> 19 <TBODY> 20 <TR> 21<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>sPtr</EM></STRONG></CODE></TD> 22<TD width="520" valign="top" align="left"><A href="../structures/MtxStack_MtxStackPtr.html"><CODE>MtxStack</CODE></A> structure from which stack memory will be freed. <B>Note:</B> This frees <code><strong><em>sPtr</em>->stackBase</strong></code>; it has no effect on <code><em><strong>sPtr</strong></em></code> itself.</TD> 23 </TR> 24 </TBODY> 25</TABLE> 26</DIV> 27<H2 align="left">Return Values</H2> 28<P align="left">None.</P> 29<H2 align="left">Description</H2> 30<P>This macro is defined in <code>mtx.h</code>. <code>MTXFreeStack</code> frees memory previously allocated to<strong> <code><em>sPtr</em>->stackBase</code></strong> by <a href="MTXAllocStack.html"><code>MTXAllocStack</code></a>.</P> 31<P><code>MTXFreeStack</code> uses the <a href="../../os/Alloc/OSFree.html"><code>OSFree</code></a> routine to free matrix stack memory previously allocated to <code><em><strong>sPtr</strong></em></code>. It is defined as a macro to expose the memory-freeing routine in the <code>mtx.h</code> header file. This insulates <code>mtx.lib</code> from changes to the OS memory management routines. Changes to the OS 'free' routines require only a redefinition of <code>MTXFreeStack</code> and a re-compile of <code>mtx.h</code>.</P> 32 33 34<H2 align="left">See Also</H2> 35<P align="left"><A href="../structures/Mtx_MtxPtr.html"><CODE>Mtx, MtxPtr</CODE></A>, <A href="../structures/MtxStack_MtxStackPtr.html"><CODE>MtxStack, MtxStackPtr</CODE></A>, <A href="MTXAllocStack.html"><CODE>MTXAllocStack</CODE></A>, <A href="MTXInitStack.html"><CODE>MTXInitStack</CODE></A>, <A href="../../os/Alloc/OSAlloc.html"><CODE>OSAlloc</CODE></A>, <A href="../../os/Alloc/OSFree.html"><CODE>OSFree</CODE></A></P> 36<H2>Revision History</H2> 37<P>2006/03/01 Initial version.</P> 38<hr> 39<P>CONFIDENTIAL</p> 40</BODY> 41</HTML>