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_GetTotalOccupiedSize</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_GetTotalOccupiedSize <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>u32 OS_GetTotalOccupiedSize( 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 memory blocks allocated to the heap. Header is included.</P>
34<H2>Description</H2>
35<P>Obtains the total size of the memory blocks allocated to 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 memory block headers are included in the size value. The size refers to the header size and the data regions. When the header cannot be included, use <CODE><A href="OS_GetTotalAllocSize.html">OS_GetTotalAllocSize()</A></CODE> .</P>
38<P>All allocated 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_GetTotalFreeSize.html">OS_GetTotalFreeSize</A>, <A href="OS_GetMaxFreeSize.html">OS_GetMaxFreeSize</A><BR> <A href="OS_GetTotalAllocSize.html">OS_GetTotalAllocSize</A><BR></CODE></P>
41<H2>Revision History</H2>
42<P>2005/10/07 Initial version.</P>
43<hr><p>CONFIDENTIAL</p></body>
44</HTML>