|
Symbian sdk帮助-堆结构 译文作者: Leefj
|
| 译文版本:1.0 译文时间:2005-12-9 |
|
| |
|
|
|
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.
堆只是简单的包含了两个内存单元列表;一个是已经分配出去的内存单元列表;另外一个是空闲的内存单元列表。两个列表够固着于Heap对象。
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.
单元头是一个在RHeap类中定义的 RHeap::SCell 结构体。
The following diagram shows a typical mix of free and allocated cells.
下图是一个空闲单元和已分配单元混合在一起的示意图:

|