[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: modules for generic unordered sets and mappings

From: Bruno Haible
Subject: Re: RFC: modules for generic unordered sets and mappings
Date: Fri, 2 Jul 2010 11:26:27 +0200
User-agent: KMail/1.9.9

Paul Eggert wrote:
> Table A is indexed by device number (a dev_t value)
> Table B is indexed by inode number
> The gnulib hash package uses void * keys, but having a void * value
> that exists only to point to an ino_t value wastes memory.

Eric Blake wrote:
> sizeof(ino_t) == 8

Jim Meyering wrote:
> it would be useful to allow a key type of uintmax_t.

dev_t, ino_t, uintmax_t are special cases of "memory block of varying size",
with - in fact - the same size for each element. So, it should be possible
to specify at table creation time that all elements have the same size.
The memory representation should then be able to exploit this; no malloc is
needed in this case for storing the key.

I'll take care of this requirement.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]