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.0.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 <nitro/os.h></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 for the heap being 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>This function clears and initializes an existing heap.</P> 44<P>All memory blocks secured in <b><i>heap</i></b> get destroyed. Specify the heap region using <em><b>start</b></em> and <em><b>end</b></em>. Be careful when initializing the heap, because if there is an isolated region of heap due to the use of <CODE><A href="OS_AddToHeap.html">OS_AddToHeap()</A></CODE>, that region will not be initialized. Moreover, upon initialization, that region will be removed from a part. Caution should be exercised when initializing the heap.</P> 45<H2>See Also</H2> 46<P><code><a href="OS_InitAlloc.html">OS_InitAlloc</a> <a href="OS_AddToHeap.html">OS_AddToHeap</a><br></code></P> 47<H2>Revision History</H2> 48<P>2004/11/08 Initial version.</P> 49<hr><p>CONFIDENTIAL</p></body> 50</HTML>