Problems with ndbm
Jim Frost
madd at bu-cs.BU.EDU
Sat Aug 12 15:33:09 AEST 1989
My peeve about ndbm is that it doesn't really allow "combined key/data
of up to 4096 bytes". It'll let you *try*, but with larger key/data
combinations, you'll get large numbers of failures on similar keys.
We found that you don't get reliable insertion unless the records are
pretty short (circa 128 bytes; 1024 failed a lot and 2048+ failed much
of the time; for our use anything smaller than 1k was pretty useless).
The simple way to get around this is to use ndbm to maintain indeces
into a file of records, which works great, but I still tore my hair
out before doing this.
If someone in-the-know could explain this behavior to me, I would be
grateful.
jim frost
software tool & die
madd at std.com
More information about the Comp.unix.questions
mailing list