Patent ID: 7630306

Claim:
A network device for dynamically allocating memory locations to plurality of queues, the network device comprising: means for determining number of memory buffers that are associated with a port; means for assigning a fixed allocation of the memory buffers to each of a plurality of queues associated with the port; means for sharing remaining memory buffers among the plurality of queues, wherein the remaining memory buffers are used by at least one of the plurality of queues after the fixed allocation of memory buffers assigned to the queue is used by the queue; and means for setting a plurality of limit thresholds for each of the plurality of queues, wherein the limit thresholds are each associated with a packet color and determine how much of the remaining memory buffers may be used by each of the plurality of queues, wherein the network device is configured to track the remaining memory buffers with a dynamic register counter, wherein the dynamic register counter tracks the available memory buffers that are assigned to each port and sets an initial value of the dynamic register counter to a total number of memory buffers associated with the port minus a sum of the fixed allocation of memory buffers, and wherein when one of the limit thresholds associated with the color of a newly arriving packet is reached by a counter for one of the plurality of queues or all of the remaining buffers are used, a request by the one of the plurality of queues to store the newly arriving packet is denied.