A method of handling data in a memory of a network device is disclosed.
The method includes the steps of storing portions of a datagram, being
handled by a network device, in a memory, where the memory comprises two
logic memory blocks, storing at least two pointers with the portions of
the datagram in the memory, where one of the at least two pointers points
to a next portion of the memory to be accessed, retrieving the portions
of the datagram and the at least two pointers when the network device is
ready to act on the datagram, polling a register to determine which of
the at least two pointers actually points to the next portion, retrieving
the next portion, when necessary and acting on the datagram based on the
processing of the datagram by the network device.