equal
deleted
inserted
replaced
7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept xml:lang="en" id="GUID-C549EC51-D81F-5AEC-80EA-EF83B2D9AF51"><title>Structure of a heap</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>A heap simply consists of two lists of cells; one is the list of allocated cells and the other the list of free cells. Each list is anchored in the heap object.</p> <p>A cell consists of a cell header followed by the body of the cell itself. The body of the cell is the area of memory which is considered allocated.</p> <p>The cell header is a struct of type <codeph>RHeap::SCell</codeph> defined as part of the <codeph>RHeap</codeph> class in <filepath>e32std.h</filepath>.</p> <p>The following diagram shows a typical mix of free and allocated cells.</p> <fig id="GUID-A066C7F2-B6E9-5F64-8A00-F2AC5D16B585"><image href="GUID-4B4110D9-0CAA-5CA1-A994-9DAF501119E4_d0e332197_href.png" placement="inline"/></fig> </conbody></concept> |
12 <concept id="GUID-C549EC51-D81F-5AEC-80EA-EF83B2D9AF51" xml:lang="en"><title>Structure |
|
13 of a heap</title><shortdesc>A heap consists of two lists of cells; the list of allocated cells |
|
14 and the list of free cells.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
15 <p>A heap simply consists of two lists of cells; one is the list of allocated |
|
16 cells and the other the list of free cells. Each list is anchored in the heap |
|
17 object.</p> |
|
18 <p>A cell consists of a cell header followed by the body of the cell itself. |
|
19 The body of the cell is the area of memory which is considered allocated.</p> |
|
20 <p>The cell header is a struct of type <codeph>RHeap::SCell</codeph> defined |
|
21 as part of the <codeph>RHeap</codeph> class in <filepath>e32std.h</filepath>.</p> |
|
22 <p>The following diagram shows a typical mix of free and allocated cells.</p> |
|
23 <fig id="GUID-A066C7F2-B6E9-5F64-8A00-F2AC5D16B585"> |
|
24 <title>Example of the allocated and free cells in a heap</title> |
|
25 <image href="GUID-4B4110D9-0CAA-5CA1-A994-9DAF501119E4_d0e353468_href.png" placement="inline"/> |
|
26 </fig> |
|
27 </conbody></concept> |