6.3 Approximate Limit Counters
Keywords: perfbook_html

#
6.3 Approximate Limit Counters

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.

Subsections

- 6.3.1 Design
- 6.3.2 Simple Limit Counter Implementation
- 6.3.3 Simple Limit Counter Discussion
- 6.3.4 Approximate Limit Counter Implementation
- 6.3.5 Approximate Limit Counter Discussion