A method and apparatus are disclosed for prefragmenting or presegmenting
data. A data protocol type and length are provided. Based on the type and
length, a linked list memory buffer structure is determined. Locations
within the memory buffer structure for storage of data therein is also
determined allowing for sufficient unused memory therein to support one
of a fragmentation operation and a segmentation operation subsequent to
memory allocation. As such, further memory allocation during a
fragmentation operation or a segmentation operation is obviated. The
determined memory buffer structure is then allocated.