ZCOM Tables and Data Structures

Data Buffer Pool

Data Buffer Pool

The data buffer pool is part of the ZCOM memory structure. The size of data buffer pool is defined in the TTGEN configuration file. The data buffer pool is a global resource within the ZCOM subsystem.

Organization of Buffer Pool

The buffer pool is a contiguous block of memory divided dynamically into a number of variable length buffers. When the ZCOM subsystem is initialized, the single buffer pool is divided into 2 buffers: one small dummy buffer which stays in the free queue all the time, and a main buffer that contain all the remaining free space from the memory block. The size of the dummy buffer is smaller than the minimum size in buffer allocation, so it will never be released from the free pool. The two buffers are linked together in a circular list. This arrangement is to minimize the updates to the free queue header (see next paragraph), hence the buffer management code can be more efficient.

The access to the buffer pool memory block is via the free queue header. The free queue header is the first queue header (header 0). The header contains a pointer to the first free block, the last free block, and some statistics that relate to the use of the free pool. These include the number

106

Chapter 3