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_GetTotalFreeSize</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">OS_GetTotalFreeSize <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>u32 OS_GetTotalFreeSize( 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 ID of the arena for the heap from which the total size is obtained</TD> 25 </TR> 26 <TR> 27 <TD><EM><STRONG>heap</STRONG></EM></TD> 28 <TD>Heap handle of the heap from which the total size is obtained</TD> 29 </TR> 30 </TBODY> 31</TABLE> 32<H2>Return Values</H2> 33<P>The total size (in bytes) of the free blocks in the heap.</P> 34<H2>Description</H2> 35<P>This function gets the total size of the free blocks in the heap.</P> 36<P>Set <CODE>OS_CURRENT_HEAP_HANDLE</CODE> in <b><i>heap</i></b> to specify the current heap.</P> 37<P>The free block's header is not included in the size value. The size refers to the size of the free blocks' data regions.</P> 38<P>All free blocks are tracked down and calculated, so the time required for the process is proportional to the amount of memory blocks.</P> 39<H2>See Also</H2> 40<P><code><a href="OS_InitAlloc.html">OS_InitAlloc</a>, <a href="OS_GetTotalAllocSize.html">OS_GetTotalAllocSize</a>, <a href="OS_GetMaxFreeSize.html">OS_GetMaxFreeSize</a><br></code></P> 41<H2>Revision History</H2> 42<P>2004/11/05 Initial version.</P> 43<hr><p>CONFIDENTIAL</p></body> 44</HTML>