A memory is divided into a number of partitions. The partitions are grouped into
a first group of partitions and a second group of partitions. When required by
a port, a partition is assigned to the port from a pool of un-assigned partitions.
The pool of un-assigned partitions comprises of un-assigned partitions from the
first group of partitions and un-assigned partitions from the second group of partitions.
The un-assigned partitions from the first group of partitions are assigned to the
port until a first threshold is reached. The un-assigned partitions from the second
group of partitions are assigned to the port after the first threshold is reached.
A second threshold is used to limit a total number of partitions assigned to the port.