odb_data Struct Reference

a "database". More...

#include <odb.h>

Collaboration diagram for odb_data:
Collaboration graph
[legend]

List of all members.

Public Attributes

odb_node_tnode_base
 base memory area of the page
odb_index_thash_base
 base memory of hash table
odb_descr_tdescr
 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

Detailed Description

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


Member Data Documentation

base memory of the maped memory

Referenced by odb_close(), odb_get_data(), odb_grow_hashtable(), odb_open(), and odb_sync().

mmaped memory file descriptor

Referenced by odb_close(), odb_grow_hashtable(), and odb_open().

full path name of sample file

Referenced by odb_close(), and odb_open().

== 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().

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().

from base_memory to odb header

Referenced by odb_open().


The documentation for this struct was generated from the following file:

Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1