Array of same length elements, segmented buffer

Describes how elements of the same length are organised in the array buffer.

This is a CArrayFixSeg<class T> object whose elements:

  • all have the same length

  • are contained within a segmented array buffer; the elements are logically contiguous but are physically contiguous only within a segment.

A segmented buffer is implemented as a doubly linked list of equally sized cells allocated from the heap and is always extended by allocating a new segment and inserting it into the appropriate place in the list. A segmented array buffer is implemented using a CBufSeg object.

The following diagram illustrates how elements are organised within the array buffer:

This kind of array is suitable for large arrays with a high turnover of elements.

This class is immediately derived from the abstract template base class CArrayFix<class T> which is itself derived from the abstract non-templated base class CArrayFixBase.