6.3.4 Approximate Limit Counter Implementation
Keywords: perfbook_html

##
6.3.4 Approximate Limit Counter Implementation

Figure: Approximate Limit Counter Variables

Figure: Approximate Limit Counter Balancing

Because this implementation (`count_lim_app.c`) is quite similar to that in the previous section (Figures , , and ), only the changes are shown here. Figure is identical to Figure , with the addition of MAX_COUNTERMAX, which sets the maximum permissible value of the per-thread countermax variable.

Similarly, Figure is identical to the balance_count() function in Figure ), with the addition of lines 5 and 6, which enforce the MAX_COUNTERMAX limit on the per-thread countermax variable.