Patent ID: 7522622

Claim:
A network device for dynamically allocating memory locations to a plurality of queues, the network device comprising: determining unit configured to determine an amount of memory buffers that is associated with a port, for assigning a fixed allocation of memory buffers to each of a plurality of queues associated with the port and for sharing remaining memory buffers among the plurality of queues, wherein the remaining memory buffers are used by each of the plurality of queues after the fixed allocation of memory buffers assigned to the queue is used; setting unit configured to set a limit threshold for each of the plurality of queues, wherein the limit threshold determines how much of the remaining memory buffer may be used by each of the plurality of queues; and defining unit configured to define a plurality of color thresholds for each of the plurality of queues, wherein each of the plurality of color thresholds corresponds to packets including a specified color marking and each of the plurality of color thresholds corresponds to a number of memory buffers, the defining unit also configured for defining a virtual maximum threshold; wherein when one of the plurality of queues requests access to the remaining memory buffers and the remaining memory buffers is less than the limit threshold for the queue, the virtual maximum threshold is defined for the queue, wherein the virtual maximum threshold replaces the limit threshold and packets associated with each of the plurality of color thresholds are processed in proportion with other color thresholds based on the virtual maximum threshold ceiling.