Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uakari.primate.wisc.edu!sdd.hp.com!mips!apple!agate!agate!adrianho From: adrianho@barkley.berkeley.edu (Adrian J Ho) Newsgroups: comp.unix.programmer Subject: Re: NDBM and ME Message-ID: Date: 11 May 91 09:12:16 GMT References: <13080@dog.ee.lbl.gov> Sender: root@agate.berkeley.edu (Charlie Root) Distribution: usa Organization: University of California, Berkeley Lines: 25 In-Reply-To: torek@elf.ee.lbl.gov's message of Sat, 11 May 91 06: 08:01 GMT In article <13080@dog.ee.lbl.gov> torek@elf.ee.lbl.gov (Chris Torek) writes: >Note that ndbm places a (fairly small) limit on the size of any >single 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@barkley.berkeley.edu