a "database". More...
#include <odb.h>

Public Attributes | |
| odb_node_t * | node_base |
| base memory area of the page | |
| odb_index_t * | hash_base |
| base memory of hash table | |
| odb_descr_t * | descr |
| the current state of database | |
| odb_hash_mask_t | hash_mask |
| == descr->size - 1 | |
| unsigned int | sizeof_header |
| from base_memory to odb header | |
| unsigned int | offset_node |
| from base_memory to node array | |
| void * | base_memory |
| base memory of the maped memory | |
| int | fd |
| mmaped memory file descriptor | |
| char * | filename |
| full path name of sample file | |
| int | ref_count |
| reference count | |
| struct list_head | list |
| hash bucket list | |
a "database".
this is an in memory only description.
We allow to manage a database inside a mapped file with an "header" of unknown size so odb_open get a parameter to specify the size of this header. A typical use is:
struct header { int etc; ... }; odb_open(&hash, filename, ODB_RW, sizeof(header)); so on this library have no dependency on the header type.
the internal memory layout from base_memory is: the unknown header (sizeof_header) odb_descr_t the node array: (descr->size * sizeof(odb_node_t) entries the hash table: array of odb_index_t indexing the node array (descr->size * BUCKET_FACTOR) entries
| void* odb_data::base_memory |
base memory of the maped memory
Referenced by odb_close(), odb_get_data(), odb_grow_hashtable(), odb_open(), and odb_sync().
the current state of database
Referenced by odb_check_hash(), odb_close(), odb_get_iterator(), odb_grow_hashtable(), odb_hash_stat(), odb_open(), and odb_sync().
| int odb_data::fd |
mmaped memory file descriptor
Referenced by odb_close(), odb_grow_hashtable(), and odb_open().
| char* odb_data::filename |
full path name of sample file
Referenced by odb_close(), and odb_open().
base memory of hash table
Referenced by odb_check_hash(), odb_grow_hashtable(), odb_hash_stat(), odb_open(), and odb_update_node_with_offset().
== descr->size - 1
Referenced by odb_grow_hashtable(), and odb_open().
struct list_head odb_data::list [read] |
hash bucket list
Referenced by odb_close(), and odb_open().
base memory area of the page
Referenced by odb_check_hash(), odb_get_iterator(), odb_grow_hashtable(), odb_hash_stat(), odb_open(), and odb_update_node_with_offset().
| unsigned int odb_data::offset_node |
from base_memory to node array
Referenced by odb_open().
reference count
Referenced by odb_close(), odb_open(), and odb_open_count().
| unsigned int odb_data::sizeof_header |
from base_memory to odb header
Referenced by odb_open().
1.6.1