clientlog: store records in hash table instead of tree

This simplifies the code and allows older records to be reused when no
more memory can be allocated for new addresses. Each slot of the hash
table has 16 records and there is no chaining between different slots.
Reused records may be newer than records in other slots, but the search
time remains constant.
This commit is contained in:
Miroslav Lichvar
2015-11-24 14:51:15 +01:00
parent 086e886d1e
commit 464cdbbb6e
2 changed files with 159 additions and 219 deletions

View File

@@ -1353,10 +1353,10 @@ directive}).
@c {{{ clientloglimit
@node clientloglimit directive
@subsection clientloglimit
This directive specifies the maximum size of the memory allocated to
log client accesses. When the limit is reached, only information for
clients that have already been logged will be updated. The default is
524288 bytes.
This directive specifies the maximum amount of memory that @code{chronyd} is
allowed to allocate for logging of client accesses. The default limit is
524288 bytes, which allows monitoring of several thousands of addresses at the
same time.
In older @code{chrony} versions if the limit was set to 0, the memory
allocation was unlimited.