odb_data Struct Reference

#include <odb.h>

Collaboration diagram for odb_data:
Collaboration graph
[legend]

Data Fields

odb_node_tnode_base
odb_index_thash_base
odb_descr_tdescr
odb_hash_mask_t hash_mask
unsigned int sizeof_header
unsigned int offset_node
void * base_memory
int fd
char * filename
int ref_count
struct list_head 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

Definition at line 75 of file odb.h.


Field Documentation

base memory of the maped memory

Definition at line 82 of file odb.h.

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

mmaped memory file descriptor

Definition at line 83 of file odb.h.

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

full path name of sample file

Definition at line 84 of file odb.h.

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

base memory of hash table

Definition at line 77 of file odb.h.

Referenced by add_node(), check_circular_list(), odb_check_hash(), odb_grow_hashtable(), odb_hash_stat(), odb_open(), and odb_update_node_with_offset().

== descr->size - 1

Definition at line 79 of file odb.h.

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

struct list_head odb_data::list [read]

hash bucket list

Definition at line 86 of file odb.h.

Referenced by odb_close(), and odb_open().

unsigned int odb_data::offset_node

from base_memory to node array

Definition at line 81 of file odb.h.

Referenced by odb_open(), odb_to_hash_base(), odb_to_node_base(), and tables_size().

reference count

Definition at line 85 of file odb.h.

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

from base_memory to odb header

Definition at line 80 of file odb.h.

Referenced by odb_open(), and odb_to_descr().


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

Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1