Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

map_root Struct Reference
[Maps]

This structure contains all information about a map. More...

#include <map.h>


Data Fields

enum valtype type
 type of the values stored in the array
int maxnum
 maximum number of elements allowed in the array.
int num
 current number of used elements
int no_wrap
 when more than maxnum elements, wrap or discard?
list_head head
 linked list of current entries
list_head pool
 pool of unused entries.
map_nodekey
 saved key entry for lookups
u_int8_t create
 this is the creation data saved between the key functions and the set/get functions
enum keytype c_key1type
enum keytype c_key2type
hlist_head * c_keyhead
key_data c_key1
key_data c_key2
hlist_head hashes [HASH_TABLE_SIZE]
 the hash table for this array
void * membuf
 pointer to allocated memory space.


Detailed Description

This structure contains all information about a map.

It is allocated once when _stp_map_new() is called.

Definition at line 67 of file map.h.


Field Documentation

u_int8_t map_root::create
 

this is the creation data saved between the key functions and the set/get functions

Todo:
Needs to be per-cpu data for SMP support

Definition at line 93 of file map.h.

Referenced by _stp_map_get_int64(), _stp_map_get_stat(), _stp_map_get_str(), _stp_map_key_long_long(), _stp_map_key_long_str(), _stp_map_key_str_long(), _stp_map_key_str_str(), _stp_map_set_stat(), _stp_map_set_str(), and _stp_map_stat_add().

void* map_root::membuf
 

pointer to allocated memory space.

Used for freeing memory.

Definition at line 104 of file map.h.

Referenced by _stp_map_del(), and _stp_map_new().

struct list_head map_root::pool
 

pool of unused entries.

Used only when entries are statically allocated at startup.

Definition at line 85 of file map.h.

Referenced by _stp_list_clear(), _stp_map_new(), _stp_map_set_stat(), and _stp_map_set_str().


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