🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Bert Loos Tue, 09 Jan 1996 15:41
hsearch() in libc.a -- hashtable troubles
#924
Author: Bert Loos
Date: Tue, 09 Jan 1996 15:41
18 lines
1258 bytes
I cannot understand this hsearch function. Even when I initialize 
a huge hashtable, hsearch(item,FIND) still bumps on full slots 
with 5-10% of the keys. (I use integers as keys, 0..2^24) 

Even worse, hsearch then *overwrites* the previous key value
with the new one! Even with FIND as action, not ENTER!
It should use the next free slot, right?

Can anyone enlighten me please?

-- 
Bert Loos			         e-mail: loos@esat.kuleuven.ac.be
K.U.Leuven, Dept.Elektrotechniek, ESAT-MI2	       Tel: +32-16-321070
Kard.Mercierlaan 94, B-3001 Leuven, BELGIUM            Fax: +32-16-321986
^^^^^^^^^^^^^^^^ http://www.esat.kuleuven.ac.be/~loos ^^^^^^^^^^^^^^^^^^^
geekcode3.1:  GE d-- s:- a-- C++ UO++ P+ L E+ W+ N++ o? K- w--- O+ !M !V- 
PS+ PE Y+ PGP-- t 5+ X- R- tv(++) b++ !DI D+ G++ e+++(*) h*(--) r-- z-(+)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads