MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cache_t Struct Reference

#include <cache.h>

Public Attributes

pthread_mutex_t mutex
char * name
void ** ptr
size_t bufsize
int freetotal
int freecurr
cache_constructor_t * constructor
cache_destructor_t * destructor

Detailed Description

Definition of the structure to keep track of the internal details of the cache allocator. Touching any of these variables results in undefined behavior.

Definition at line 46 of file cache.h.

Member Data Documentation

size_t cache_t::bufsize

The size of each element in this cache

Definition at line 54 of file cache.h.

cache_constructor_t* cache_t::constructor

The constructor to be called each time we allocate more memory

Definition at line 60 of file cache.h.

cache_destructor_t* cache_t::destructor

The destructor to be called each time before we release memory

Definition at line 62 of file cache.h.

int cache_t::freecurr

The current number of free elements

Definition at line 58 of file cache.h.

int cache_t::freetotal

The capacity of the list of elements

Definition at line 56 of file cache.h.

pthread_mutex_t cache_t::mutex

Mutex to protect access to the structure

Definition at line 48 of file cache.h.

char* cache_t::name

Name of the cache objects in this cache (provided by the caller)

Definition at line 50 of file cache.h.

void** cache_t::ptr

List of pointers to available buffers in this cache

Definition at line 52 of file cache.h.


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