Methods and apparatus are disclosed for maintaining statistic counters and
updating a secondary counter memory via a queue for reducing or
eliminating overflow of the counters. Multiple counter values are stored
in a primary counter storage. An indication of a particular counter to
update is received. An updated value for the particular counter is
determined. A determination is made whether to store the updated value in
the primary storage or to add to an update counter queue based on the
updated value and an occupancy level of the update counter queue. In one
implementation, this determination includes comparing a function of the
updated value with the occupancy level. In one implementation, this
determination includes comparing twice the updated value with the
occupancy level. In one implementation, a backpressure signal is
generated if the updated value is to be added to the update counter queue
and the queue is full.