off_t and FILE access stuff ..

Kurt Wall kwall
Thu Feb 16 21:32:46 PST 2006


On Thu, Feb 02, 2006 at 07:52:31AM -0600, Ben Duncan took 24 lines to write:
> Ok, this is for one of you REAL brains.
> 
> If a DBM FILE manager is going to need acces to files LARGER than 32 bit
> offset's and you use 32 bit hash keyes, do the hash keyes need to be
> increased to 64 bits themselves ?

I'd say it depends on what your hash functions require. If you can get
uniqueness in 32-bits and don't anticipate needing more, go with
32-bit. I'd use 64-bit hashes: the day isn't far off that 64-bit will
be commonplace and 32-bit values won't be sufficient.

> I know that unsigned 32 bit hash keyes will allow for 2GB record count,
> But I did not know if one needed to increase the hash keye size along
> with the off_t size ...

Like I said, providing I understand the question, it depends on what
your hash generator needs to guarantee uniqueness/avoid key collisions.

Kurt
-- 
There was a young lady from Hyde
Who ate a green apple and died.
	While her lover lamented
	The apple fermented
And made cider inside her inside.


More information about the Linux-users mailing list