Skip to content

File memory_hash.h

FileList > base > memory_hash.h

Go to the source code of this file

  • #include "dbtype_def.h"
  • #include "memory_alloc.h"
  • #include "thread_compat.hpp"
  • #include <stdio.h>

Classes

Type Name
struct hentry
struct hentry_hls
struct mht_hls_table
struct mht_table

Public Types

Type Name
typedef struct hentry HENTRY
typedef struct hentry_hls HENTRY_HLS
typedef struct hentry_hls * HENTRY_HLS_PTR
typedef struct hentry * HENTRY_PTR
typedef struct mht_hls_table MHT_HLS_TABLE
typedef struct mht_table MHT_TABLE

Public Functions

Type Name
unsigned int mht_1strhash (const void * key, const unsigned int ht_size)
unsigned int mht_1strlowerhash (const void * key, const unsigned int ht_size)
unsigned int mht_2str_pseudo_key (const void * key, int key_size)
unsigned int mht_2strhash (const void * key, const unsigned int ht_size)
unsigned int mht_3strhash (const void * key, const unsigned int ht_size)
unsigned int mht_4strhash (const void * key, const unsigned int ht_size)
unsigned int mht_5strhash (const void * key, const unsigned int ht_size)
int mht_adjust_lru_list (MHT_TABLE * ht, HENTRY_PTR hentry)
unsigned int mht_calculate_htsize (unsigned int ht_size)
unsigned int mht_calculate_htsize_for_pow2 (unsigned int ht_size)
int mht_clear (MHT_TABLE * ht, int(*)(const void *key, void *data, void *args) rem_func, void * func_args)
int mht_clear_hls (MHT_HLS_TABLE * ht, int(*)(const void *key, void *data, void *args) rem_func, void * func_args)
int mht_compare_dbvalues_are_equal (const void * key1, const void * key2)
int mht_compare_identifiers_equal (const void * key1, const void * key2)
int mht_compare_ints_are_equal (const void * key1, const void * key2)
int mht_compare_logpageids_are_equal (const void * key1, const void * key2)
int mht_compare_ptrs_are_equal (const void * key1, const void * key2)
int mht_compare_strings_are_equal (const void * key1, const void * key2)
unsigned int mht_count (const MHT_TABLE * ht)
MHT_TABLE * mht_create (const char * name, int est_size, unsigned int(*)(const void *key, unsigned int ht_size) hash_func, int(*)(const void *key1, const void *key2) cmp_func)
MHT_HLS_TABLE * mht_create_hls (const char * name, int est_size, unsigned int(*)(const void *key, unsigned int ht_size) hash_func, int(*)(const void *key1, const void *key2) cmp_func)
void mht_destroy (MHT_TABLE * ht)
void mht_destroy_hls (MHT_HLS_TABLE * ht)
int mht_dump (THREAD_ENTRY * thread_p, FILE * out_fp, const MHT_TABLE * ht, const int print_id_opt, int(*)(THREAD_ENTRY *thread_p, FILE *fp, const void *key, void *data, void *args) print_func, void * func_args)
int mht_dump_hls (THREAD_ENTRY * thread_p, FILE * out_fp, const MHT_HLS_TABLE * ht, const int print_id_opt, int(*)(THREAD_ENTRY *thread_p, FILE *fp, const void *data, const void *type_list, void *args) print_func, const void * type_list, void * func_args)
void * mht_get (MHT_TABLE * ht, const void * key)
void * mht_get2 (const MHT_TABLE * ht, const void * key, void ** last)
unsigned int mht_get_hash_number (const int unsigned ht_size, const DB_VALUE * val)
void * mht_get_hls (const MHT_HLS_TABLE * ht, const void * key, void ** last)
void * mht_get_next_hls (const MHT_HLS_TABLE * ht, const void * key, void ** last)
int mht_map (const MHT_TABLE * ht, int(*)(const void *key, void *data, void *args) map_func, void * func_args)
int mht_map_no_key (THREAD_ENTRY * thread_p, const MHT_TABLE * ht, int(*)(THREAD_ENTRY *thread_p, void *data, void *args) map_func, void * func_args)
unsigned int mht_numhash (const void * key, const unsigned int ht_size)
unsigned int mht_ptrhash (const void * ptr, const unsigned int ht_size)
const void * mht_put (MHT_TABLE * ht, const void * key, void * data)
const void * mht_put2 (MHT_TABLE * ht, const void * key, void * data)
const void * mht_put2_data (MHT_TABLE * ht, const void * key, void * data)
const void * mht_put2_new (MHT_TABLE * ht, const void * key, void * data)
const void * mht_put_data (MHT_TABLE * ht, const void * key, void * data)
const void * mht_put_hls (MHT_HLS_TABLE * ht, const void * key, void * data)
const void * mht_put_if_not_exists (MHT_TABLE * ht, const void * key, void * data)
const void * mht_put_new (MHT_TABLE * ht, const void * key, void * data)
int mht_rem (MHT_TABLE * ht, const void * key, int(*)(const void *key, void *data, void *args) rem_func, void * func_args)
int mht_rem2 (MHT_TABLE * ht, const void * key, const void * data, int(*)(const void *key, void *data, void *args) rem_func, void * func_args)
unsigned int mht_valhash (const void * key, const unsigned int ht_size)

Macros

Type Name
define MHT2STR_COLL (id, str, size) ([**lang\_get\_collation**](language__support_8c.md#function-lang_get_collation) ([**id**](thread__worker__pool__impl_8hpp.md#enum-id)))-&gt;mht2str (([**lang\_get\_collation**](language__support_8c.md#function-lang_get_collation) ([**id**](thread__worker__pool__impl_8hpp.md#enum-id))), (str), (size))
define ROTL32 (x, r) ((([**x**](broker__monitor_8c.md#function-timeout)) &lt;&lt; (r)) \| (([**x**](broker__monitor_8c.md#function-timeout)) &gt;&gt; (32 - (r))))

Public Types Documentation

typedef HENTRY

typedef struct hentry HENTRY;

typedef HENTRY_HLS

typedef struct hentry_hls HENTRY_HLS;

typedef HENTRY_HLS_PTR

typedef struct hentry_hls* HENTRY_HLS_PTR;

typedef HENTRY_PTR

typedef struct hentry* HENTRY_PTR;

typedef MHT_HLS_TABLE

typedef struct mht_hls_table MHT_HLS_TABLE;

typedef MHT_TABLE

typedef struct mht_table MHT_TABLE;

Public Functions Documentation

function mht_1strhash

unsigned  int mht_1strhash (
    const  void * key,
    const  unsigned  int ht_size
) 

function mht_1strlowerhash

unsigned  int mht_1strlowerhash (
    const  void * key,
    const  unsigned  int ht_size
) 

function mht_2str_pseudo_key

unsigned  int mht_2str_pseudo_key (
    const  void * key,
    int key_size
) 

function mht_2strhash

unsigned  int mht_2strhash (
    const  void * key,
    const  unsigned  int ht_size
) 

function mht_3strhash

unsigned  int mht_3strhash (
    const  void * key,
    const  unsigned  int ht_size
) 

function mht_4strhash

unsigned  int mht_4strhash (
    const  void * key,
    const  unsigned  int ht_size
) 

function mht_5strhash

unsigned  int mht_5strhash (
    const  void * key,
    const  unsigned  int ht_size
) 

function mht_adjust_lru_list

int mht_adjust_lru_list (
    MHT_TABLE * ht,
    HENTRY_PTR hentry
) 

function mht_calculate_htsize

unsigned  int mht_calculate_htsize (
    unsigned  int ht_size
) 

function mht_calculate_htsize_for_pow2

unsigned  int mht_calculate_htsize_for_pow2 (
    unsigned  int ht_size
) 

function mht_clear

int mht_clear (
    MHT_TABLE * ht,
    int (*)( const  void *key, void *data, void *args) rem_func,
    void * func_args
) 

function mht_clear_hls

int mht_clear_hls (
    MHT_HLS_TABLE * ht,
    int (*)( const  void *key, void *data, void *args) rem_func,
    void * func_args
) 

function mht_compare_dbvalues_are_equal

int mht_compare_dbvalues_are_equal (
    const  void * key1,
    const  void * key2
) 

function mht_compare_identifiers_equal

int mht_compare_identifiers_equal (
    const  void * key1,
    const  void * key2
) 

function mht_compare_ints_are_equal

int mht_compare_ints_are_equal (
    const  void * key1,
    const  void * key2
) 

function mht_compare_logpageids_are_equal

int mht_compare_logpageids_are_equal (
    const  void * key1,
    const  void * key2
) 

function mht_compare_ptrs_are_equal

int mht_compare_ptrs_are_equal (
    const  void * key1,
    const  void * key2
) 

function mht_compare_strings_are_equal

int mht_compare_strings_are_equal (
    const  void * key1,
    const  void * key2
) 

function mht_count

unsigned  int mht_count (
    const  MHT_TABLE * ht
) 

function mht_create

MHT_TABLE * mht_create (
    const  char * name,
    int est_size,
    unsigned  int (*)( const  void *key, unsigned  int  ht_size ) hash_func,
    int (*)( const  void *key1, const  void *key2) cmp_func
) 

function mht_create_hls

MHT_HLS_TABLE * mht_create_hls (
    const  char * name,
    int est_size,
    unsigned  int (*)( const  void *key, unsigned  int  ht_size ) hash_func,
    int (*)( const  void *key1, const  void *key2) cmp_func
) 

function mht_destroy

void mht_destroy (
    MHT_TABLE * ht
) 

function mht_destroy_hls

void mht_destroy_hls (
    MHT_HLS_TABLE * ht
) 

function mht_dump

int mht_dump (
    THREAD_ENTRY * thread_p,
    FILE * out_fp,
    const  MHT_TABLE * ht,
    const  int print_id_opt,
    int (*)( THREAD_ENTRY *thread_p, FILE *fp, const  void *key, void *data, void *args) print_func,
    void * func_args
) 

function mht_dump_hls

int mht_dump_hls (
    THREAD_ENTRY * thread_p,
    FILE * out_fp,
    const  MHT_HLS_TABLE * ht,
    const  int print_id_opt,
    int (*)( THREAD_ENTRY *thread_p, FILE *fp, const  void *data, const  void *type_list, void *args) print_func,
    const  void * type_list,
    void * func_args
) 

function mht_get

void * mht_get (
    MHT_TABLE * ht,
    const  void * key
) 

function mht_get2

void * mht_get2 (
    const  MHT_TABLE * ht,
    const  void * key,
    void ** last
) 

function mht_get_hash_number

unsigned  int mht_get_hash_number (
    const  int  unsigned ht_size,
    const  DB_VALUE * val
) 

function mht_get_hls

void * mht_get_hls (
    const  MHT_HLS_TABLE * ht,
    const  void * key,
    void ** last
) 

function mht_get_next_hls

void * mht_get_next_hls (
    const  MHT_HLS_TABLE * ht,
    const  void * key,
    void ** last
) 

function mht_map

int mht_map (
    const  MHT_TABLE * ht,
    int (*)( const  void *key, void *data, void *args) map_func,
    void * func_args
) 

function mht_map_no_key

int mht_map_no_key (
    THREAD_ENTRY * thread_p,
    const  MHT_TABLE * ht,
    int (*)( THREAD_ENTRY *thread_p, void *data, void *args) map_func,
    void * func_args
) 

function mht_numhash

unsigned  int mht_numhash (
    const  void * key,
    const  unsigned  int ht_size
) 

function mht_ptrhash

unsigned  int mht_ptrhash (
    const  void * ptr,
    const  unsigned  int ht_size
) 

function mht_put

const  void * mht_put (
    MHT_TABLE * ht,
    const  void * key,
    void * data
) 

function mht_put2

const  void * mht_put2 (
    MHT_TABLE * ht,
    const  void * key,
    void * data
) 

function mht_put2_data

const  void * mht_put2_data (
    MHT_TABLE * ht,
    const  void * key,
    void * data
) 

function mht_put2_new

const  void * mht_put2_new (
    MHT_TABLE * ht,
    const  void * key,
    void * data
) 

function mht_put_data

const  void * mht_put_data (
    MHT_TABLE * ht,
    const  void * key,
    void * data
) 

function mht_put_hls

const  void * mht_put_hls (
    MHT_HLS_TABLE * ht,
    const  void * key,
    void * data
) 

function mht_put_if_not_exists

const  void * mht_put_if_not_exists (
    MHT_TABLE * ht,
    const  void * key,
    void * data
) 

function mht_put_new

const  void * mht_put_new (
    MHT_TABLE * ht,
    const  void * key,
    void * data
) 

function mht_rem

int mht_rem (
    MHT_TABLE * ht,
    const  void * key,
    int (*)( const  void *key, void *data, void *args) rem_func,
    void * func_args
) 

function mht_rem2

int mht_rem2 (
    MHT_TABLE * ht,
    const  void * key,
    const  void * data,
    int (*)( const  void *key, void *data, void *args) rem_func,
    void * func_args
) 

function mht_valhash

unsigned  int mht_valhash (
    const  void * key,
    const  unsigned  int ht_size
) 

Macro Definition Documentation

define MHT2STR_COLL

#define MHT2STR_COLL (
    id,
    str,
    size
) `( lang_get_collation ( id ))->mht2str (( lang_get_collation ( id )), (str), (size))`

define ROTL32

#define ROTL32 (
    x,
    r
) `((( x ) << (r)) | (( x ) >> (32 - (r))))`


The documentation for this class was generated from the following file cubrid/src/base/memory_hash.h