NDBM and ME
Adrian J Ho
adrianho at barkley.berkeley.edu
Sat May 11 19:12:16 AEST 1991
In article <13080 at dog.ee.lbl.gov> torek at elf.ee.lbl.gov (Chris Torek) writes:
>Note that ndbm places a (fairly small) limit on the size of any
>single <key+content> pair (4096 bytes, minus overhead; this comes
>to 4090 bytes for a page with one pair [1 count + 2 offsets, all
>shorts, consumes 6 bytes]).
Oops, forgot about that. I doubt that the original poster will have
trouble with that limit, given the struct s/he posted, but some people
have strange addresses. 8-)
Addendum to my original post: If you have large structs that you wish
to store using the method I outlined, you'd be well advised to grab a
copy of GNU dbm:
prep.ai.mit.edu:/pub/gnu/gdbm-1.5.tar.Z [18.71.0.38]
The record size in gdbm is theoretically unlimited.
As for the alignment problem, that's why I always do a bcopy() for
numeric data.
-----------------------------------------------------------------------------
Adrian Ho, EECS (pronounced "eeks!") Dept. Phone: (415) 642-5563
UC Berkeley adrianho at barkley.berkeley.edu
More information about the Comp.unix.programmer
mailing list