InnoDB Plugin  1.0
Data Structures | Functions
ha0storage.ic File Reference
#include "univ.i"
#include "ha0storage.h"
#include "hash0hash.h"
#include "mem0mem.h"
Include dependency graph for ha0storage.ic:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  ha_storage_t
struct  ha_storage_node_t


UNIV_INLINE ha_storage_tha_storage_create (ulint initial_heap_bytes, ulint initial_hash_cells)
UNIV_INLINE void ha_storage_empty (ha_storage_t **storage)
UNIV_INLINE void ha_storage_free (ha_storage_t *storage)
UNIV_INLINE ulint ha_storage_get_size (const ha_storage_t *storage)

Detailed Description

Hash storage. Provides a data structure that stores chunks of data in its own storage, avoiding duplicates.

Created September 24, 2007 Vasil Dimov

Function Documentation

UNIV_INLINE ha_storage_t* ha_storage_create ( ulint  initial_heap_bytes,
ulint  initial_hash_cells 

Creates a hash storage. If any of the parameters is 0, then a default value is used.

own: hash storage
initial_heap_bytesin: initial heap's size
initial_hash_cellsin: initial number of cells in the hash table
UNIV_INLINE void ha_storage_empty ( ha_storage_t **  storage)

Empties a hash storage, freeing memory occupied by data chunks. This invalidates any pointers previously returned by ha_storage_put(). The hash storage is not invalidated itself and can be used again.

storagein/out: hash storage
UNIV_INLINE void ha_storage_free ( ha_storage_t storage)

Frees a hash storage and everything it contains, it cannot be used after this call. This invalidates any pointers previously returned by ha_storage_put().

storagein, own: hash storage
UNIV_INLINE ulint ha_storage_get_size ( const ha_storage_t storage)

Gets the size of the memory used by a storage.

bytes used
storagein: hash storage