Archived
1
0
Fork 0
Commit graph

6 commits

Author SHA1 Message Date
Henrik Hautakoski
9517d28f72 dlhist.c: do linear-probing when inserting entries.
Somehow I apperently missed to do linear probing in he_insert that
results in colliding entries read from file (and when resizing)
to be dropped on the floor.

Lets not drop things on the floor anymore, certainly there is
another place in the table that will do fine instead of just
giving up and throw it on the floor.
2011-10-26 16:48:29 +01:00
Henrik Hautakoski
6758b06188 dlhist: use sha1 hashes as keys to make records fixed size.
use sha1 hashes instead of c-strings to make records fixed size.
because it's hard to find collisions in sha1 hashes, this works well
in practise. And dynamic memory allocation for the variadic size keys
is not needed anymore. space is also reduced due to most key strings being
more than 20 bytes long.

calculating sha1 should be fast enough to not make any more overhead
than dynamic memory allocation did.
2011-10-04 15:29:45 +02:00
Henrik Hautakoski
5eda6e7705 dlhist.c: resize_table: Oops, storing floating point value in integer. 2011-09-21 17:19:12 +02:00
Henrik Hautakoski
bb5963dbf6 License with GPLv2 2011-09-21 17:19:09 +02:00
Henrik Hautakoski
06dca6c150 dlhist.c: use lockfile 2011-09-21 17:19:09 +02:00
Henrik Hautakoski
b2df740514 Initial commit 2011-09-21 17:13:28 +02:00