am**@conexus.net (Ramon F Herrera) wrote in message news:<c9bc36ff.0307112300.d6
fa***@posting.google.com>...
Hello:
Is there some C hash package out there?
I am a big fan of the Berkeley DB, which has
outstanding performance, but it is (I think) restricted
to disk operations, while I would like to keep my data in RAM.
I need some sort of Perl-like relational arrays, but in C.
If you don't specify a physical file name to the Berkeley DB
Db.open method, DB will create an in-memory database. The
contents of an in-memory database are not preserved on disk.
Berkeley DB won't write the contents of any database to disk
unless the data won't fit in the cache, that is, all data is
be held in RAM until there is no longer sufficient RAM to hold
the data. In the case of in-memory databases, running out of
RAM usually implies the creation of a temporary backing files.
In the upcoming Berkeley DB 4.2.XX release, applications can
specify a maximum size for a database, and also that DB fail
operations rather than opening backing temporary files for
in-memory databases.
While there are interesting algorithms for pure in-memory
databases, a cache in front of a traditional disk-based
database is usually fine from a performance standpoint.
Regards,
--keith
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic
bo****@sleepycat.com
Sleepycat Software Inc. keithbosticim (ymsgid)
118 Tower Rd. +1-781-259-3139
Lincoln, MA 01773
http://www.sleepycat.com