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_ClearHeap</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_ClearHeap <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_ClearHeap( OSArenaId id, OSHeapHandle heap, void* start, void* end );
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 ID of the arena that includes the heap being cleared</TD>
25    </TR>
26    <TR>
27<TD width="13%"><EM><STRONG>heap</STRONG></EM></TD>
28<TD width="87%">Heap handler of the heap to be cleared</TD>
29    </TR>
30    <TR>
31<TD width="13%"><EM><STRONG>start</STRONG></EM></TD>
32<TD width="87%">Starting address of heap region</TD>
33    </TR>
34    <TR>
35<TD width="13%"><EM><STRONG>end</STRONG></EM></TD>
36<TD width="87%">Ending address of address of heap region (+1)</TD>
37    </TR>
38  </TBODY>
39</TABLE>
40<H2>Return Values</H2>
41<P>None.</P>
42<H2>Description</H2>
43<P>Clears and initializes an existing heap.</P>
44<P>All memory blocks secured in <SPAN class="argument">heap</SPAN> are destroyed. Specify the heap region using <SPAN class="argument">start</SPAN> and <SPAN class="argument">end</SPAN>. If there is an isolated region of heap due to the use of the <A href="OS_AddToHeap.html"><CODE>OS_AddToHeap</CODE></A> or <A href="OS_AddExtraAreaToHeap.html"><CODE>OS_AddExtraAreaToHeap</CODE></A> function, that region is not initialized. Moreover, upon initialization, that region will be removed from a part. Caution should be exercised when initializing the heap.</P>
45<P>This is a function for an ordinary heap created using the <A href="OS_CreateHeap.html"><CODE>OS_CreateHeap</CODE></A> function. Use the <A href="OS_ClearExtraHeap.html"><CODE>OS_ClearExtraHeap</CODE></A> function for special heaps created using the <A href="OS_CreateExtraHeap.html"><CODE>OS_CreateExtraHeap</CODE></A> function.</P>
46<H2>See Also</H2>
47<P><A href="OS_InitAlloc.html"><CODE>OS_InitAlloc</CODE></A><BR> <A href="OS_AddToHeap.html"><CODE>OS_AddToHeap</CODE></A><BR> <A href="OS_ClearExtraHeap.html"><CODE>OS_ClearExtraHeap</CODE></A></P>
48<H2>Revision History</H2>
49<P>2009/04/03 Added description of special heaps.<BR> 2004/11/08 Initial version.</P>
50<hr><p>CONFIDENTIAL</p></body>
51</HTML>