Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Structure of a heap

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.

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.

The cell header is a struct of type RHeap::SCell defined as part of the RHeap class in e32std.h.

The following diagram shows a typical mix of free and allocated cells.