Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00028 #pragma once
00029 #ifndef ha0storage_h
00030 #define ha0storage_h
00031
00032 #include "univ.i"
00033
00036 #define HA_STORAGE_DEFAULT_HEAP_BYTES 1024
00037
00040 #define HA_STORAGE_DEFAULT_HASH_CELLS 4096
00041
00043 typedef struct ha_storage_struct ha_storage_t;
00044
00045
00049 UNIV_INLINE
00050 ha_storage_t*
00051 ha_storage_create(
00052
00053 ulint initial_heap_bytes,
00054 ulint initial_hash_cells);
00057
00067 UNIV_INTERN
00068 const void*
00069 ha_storage_put_memlim(
00070
00071 ha_storage_t* storage,
00072 const void* data,
00073 ulint data_len,
00074 ulint memlim);
00076
00082 #define ha_storage_put(storage, data, data_len) \
00083 ha_storage_put_memlim((storage), (data), (data_len), 0)
00084
00085
00092 #define ha_storage_put_str(storage, str) \
00093 ((const char*) ha_storage_put((storage), (str), strlen(str) + 1))
00094
00095
00104 #define ha_storage_put_str_memlim(storage, str, memlim) \
00105 ((const char*) ha_storage_put_memlim((storage), (str), \
00106 strlen(str) + 1, (memlim)))
00107
00108
00112 UNIV_INLINE
00113 void
00114 ha_storage_empty(
00115
00116 ha_storage_t** storage);
00118
00122 UNIV_INLINE
00123 void
00124 ha_storage_free(
00125
00126 ha_storage_t* storage);
00128
00131 UNIV_INLINE
00132 ulint
00133 ha_storage_get_size(
00134
00135 const ha_storage_t* storage);
00137 #ifndef UNIV_NONINL
00138 #include "ha0storage.ic"
00139 #endif
00140
00141 #endif