D.S

dev.mysql.com

MySQL: include/lf.h File Reference

MySQL: include/lf.h File Reference MySQL  8.0.0 Source Code Documentation Main Page Related Pages Modules Namespaces Classes Files File List File Members Classes | Macros | Typedefs | Functions | Variables lf.h File Reference #include " my_global.h " #include " my_atomic.h " #include " hash.h " #include " mysql/service_mysql_alloc.h " Go to the source code of this file. Classes struct   LF_DYNARRAY   struct   LF_PINBOX   struct   st_lf_pins   struct   st_lf_allocator   struct   st_lf_hash   Macros #define  LF_DYNARRAY_LEVEL_LENGTH    256   #define  LF_DYNARRAY_LEVELS    4   #define  LF_PINBOX_PINS    4   #define  LF_PURGATORY_SIZE    10   #define  LF_REQUIRE_PINS (N)   #define  lf_alloc_init (A, B, C)    lf_alloc_init2 (A, B, C, NULL, NULL)   #define  LF_HASH_UNIQUE    1   #define  MY_LF_ERRPTR    ((void*)( intptr )1)   #define  lf_hash_init (A, B, C, D, E, F, G)    lf_hash_init2 (A, B, C, D, E, F, G, NULL, NULL, NULL, NULL)   Typedefs typedef int(*  lf_dynarray_func ) (void *, void *)   typedef void  lf_pinbox_free_func (void *, void *, void *)   typedef struct st_lf_pins   LF_PINS   typedef void  lf_allocator_func ( uchar *)   typedef struct st_lf_allocator   LF_ALLOCATOR   typedef uint   lf_hash_func (const struct st_lf_hash *, const uchar *, size_t)   typedef void  lf_hash_init_func ( uchar *dst, const uchar *src)   typedef struct st_lf_hash   LF_HASH   typedef int  lf_hash_match_func (const uchar *el)   Functions void  lf_dynarray_init ( LF_DYNARRAY *array, uint element_size)   void  lf_dynarray_destroy ( LF_DYNARRAY *array)   void *  lf_dynarray_value ( LF_DYNARRAY *array, uint idx)   void *  lf_dynarray_lvalue ( LF_DYNARRAY *array, uint idx)   int  lf_dynarray_iterate ( LF_DYNARRAY *array, lf_dynarray_func func, void *arg)   static void  lf_pin ( LF_PINS *pins, int pin, void *addr)   static void  lf_unpin ( LF_PINS *pins, int pin)   void  lf_pinbox_init ( LF_PINBOX *pinbox, uint free_ptr_offset, lf_pinbox_free_func *free_func, void *free_func_arg)   void  lf_pinbox_destroy ( LF_PINBOX *pinbox)   LF_PINS *  lf_pinbox_get_pins ( LF_PINBOX *pinbox)   void  lf_pinbox_put_pins ( LF_PINS *pins)   void  lf_pinbox_free ( LF_PINS *pins, void *addr)   void  lf_alloc_init2 ( LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset, lf_allocator_func *ctor, lf_allocator_func *dtor)   Initialize lock-free allocator. More...   void  lf_alloc_destroy ( LF_ALLOCATOR *allocator)   uint   lf_alloc_pool_count ( LF_ALLOCATOR *allocator)   static void  lf_alloc_direct_free ( LF_ALLOCATOR *allocator, void *addr)   void *  lf_alloc_new ( LF_PINS *pins)   void  lf_hash_init2 ( LF_HASH *hash, uint element_size, uint flags , uint key_offset, uint key_length , hash_get_key_function get_key , CHARSET_INFO *charset, lf_hash_func *hash_function, lf_allocator_func *ctor, lf_allocator_func *dtor, lf_hash_init_func *init)   void  lf_hash_destroy ( LF_HASH *hash)   int  lf_hash_insert ( LF_HASH *hash, LF_PINS *pins, const void *data)   void *  lf_hash_search ( LF_HASH *hash, LF_PINS *pins, const void * key , uint keylen)   Find hash element corresponding to the key. More...   int  lf_hash_delete ( LF_HASH *hash, LF_PINS *pins, const void * key , uint keylen)   static LF_PINS *  lf_hash_get_pins ( LF_HASH *hash)   static void  lf_hash_put_pins ( LF_PINS *pins)   static void  lf_hash_search_unpin ( LF_PINS *pins)   void *  lf_hash_random_match ( LF_HASH *hash, LF_PINS *pins, lf_hash_match_func *match, uint rand_val)   Find random hash element which satisfies condition specified by match function. More...   Variables const int  LF_HASH_OVERHEAD   Macro Definition Documentation #define lf_alloc_init (   A,   B,   C  )     lf_alloc_init2 (A, B, C, NULL, NULL) #define LF_DYNARRAY_LEVEL_LENGTH   256 #define LF_DYNARRAY_LEVELS   4 #define lf_hash_init (   A,   B,   C,   D,   E,   F,   G  )     lf_hash_init2 (A, B, C, D, E, F, G, NULL, NULL, NULL, NULL) #define LF_HASH_UNIQUE   1 #define LF_PINBOX_PINS   4 #define LF_PURGATORY_SIZE   10 #define LF_REQUIRE_PINS (   N ) #define MY_LF_ERRPTR   ((void*)( intptr )1) Typedef Documentation typedef struct st_lf_allocator LF_ALLOCATOR typedef void lf_allocator_func( uchar *) typedef int(* lf_dynarray_func) (void *, void *) typedef struct st_lf_hash LF_HASH typedef uint lf_hash_func(const struct st_lf_hash *, const uchar *, size_t) typedef void lf_hash_init_func( uchar *dst, const uchar *src) typedef int lf_hash_match_func(const uchar *el) typedef void lf_pinbox_free_func(void *, void *, void *) typedef struct st_lf_pins LF_PINS Function Documentation void lf_alloc_destroy ( LF_ALLOCATOR *  allocator ) static void lf_alloc_direct_free ( LF_ALLOCATOR *  allocator, void *  addr  ) inlinestatic void lf_alloc_init2 ( LF_ALLOCATOR *  allocator, uint   size, uint   free_ptr_offset, lf_allocator_func *  ctor, lf_allocator_func *  dtor  ) Initialize lock-free allocator. Parameters allocator Allocator structure to initialize. size A size of an object to allocate. free_ptr_offset An offset inside the object to a