A prime number based pointer allocation technique. A packet-forwarding
system incorporating the technique stores cells of a packet in packet
memory, according to allocated pointers that have a fixed correspondence
to locations in the packet memory. Each packet input interface of an
ingress module has a memory parameter counter that is incremented by a
different prime number each time a memory pointer is allocated to that
input interface. The memory parameter counter includes a memory interface
portion and a memory bank portion that correspond to the memory
interfaces and memory banks of a packet memory with which the memory
pointers are associated.