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="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>OS_DestroyHeap</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_DestroyHeap <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;nitro/os.h&gt;</CODE></PRE>
16  <PRE><CODE>void OS_DestroyHeap( OSArenaId id, OSHeapHandle heap );
17  </CODE></PRE>
18</DL>
19<H2>Arguments</H2>
20<TABLE border="1" width="100%">
21  <TBODY>
22    <TR>
23<TD width="13%"><EM><STRONG>id</STRONG></EM></TD>
24<TD width="87%">Arena from which the heap to be destroyed.</TD>
25    </TR>
26    <TR>
27<TD><B><I>heap</I></B></TD>
28<TD>Handle of the heap to be destroyed.</TD>
29    </TR>
30  </TBODY>
31</TABLE>
32<H2>Return Values</H2>
33<P>None.</P>
34<H2>Description</H2>
35<P>Destroys a heap region.</P>
36<P>Arena <SPAN class="argument">id</SPAN> specifies the arena ID. For more information on this value, see the <a  href="../arena/OS_InitArena.html"><code>OS_InitArena</code></a> function.</P>
37<P>Not only heaps created using the <A href="OS_CreateHeap.html"><CODE>OS_CreateHeap</CODE></A> function, but also special heaps created by the <A href="OS_CreateExtraHeap.html"><CODE>OS_CreateExtraHeap</CODE></A> function can be destroyed by this function.</P>
38<P>For DEBUG builds, the build stops on an assert if an attempt is made using the <A href="OS_AllocFromHeap.html"><CODE>OS_AllocFromHeap</CODE></A> function to allocate a region for a heap destroyed by this function. Returns <CODE>NULL</CODE> in the case of RELEASE and FINALROM builds.</P>
39
40<H2>See Also</H2>
41<P><CODE>OS_CreateHeap</CODE><BR> <CODE>OS_AllocFromHeap</CODE><BR> <A href="OS_CreateExtraHeap.html"><CODE>OS_CreateExtraHeap</CODE></A></P>
42<H2>Revision History</H2>
43<P>2009/04/03 Added description that the function can also be used for special heaps as well.<BR> 2004/01/06 Initial version.</P>
44<hr><p>CONFIDENTIAL</p></body>
45</HTML>