Another special case of counting involves limit-checking.
For example, as noted in the approximate structure-allocation limit
problem in the Quick Quiz on
page ,
suppose that you need to maintain a count of the number of
structures allocated in order to fail any allocations once the number
of structures in use exceeds a limit, in this case, 10,000.
Suppose further that these structures are short-lived, and that this
limit is rarely exceeded.