MySQL  8.0.18
Source Code Documentation
cache_t Struct Reference

Definition of the structure to keep track of the internal details of the cache allocator. More...

#include <cache.h>

Public Attributes

pthread_mutex_t mutex
 Mutex to protect access to the structure. More...
 
char * name
 Name of the cache objects in this cache (provided by the caller) More...
 
void ** ptr
 List of pointers to available buffers in this cache. More...
 
size_t bufsize
 The size of each element in this cache. More...
 
int freetotal
 The capacity of the list of elements. More...
 
int freecurr
 The current number of free elements. More...
 
cache_constructor_tconstructor
 The constructor to be called each time we allocate more memory. More...
 
cache_destructor_tdestructor
 The destructor to be called each time before we release memory. More...
 

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.

Member Data Documentation

◆ bufsize

size_t cache_t::bufsize

The size of each element in this cache.

◆ constructor

cache_constructor_t* cache_t::constructor

The constructor to be called each time we allocate more memory.

◆ destructor

cache_destructor_t* cache_t::destructor

The destructor to be called each time before we release memory.

◆ freecurr

int cache_t::freecurr

The current number of free elements.

◆ freetotal

int cache_t::freetotal

The capacity of the list of elements.

◆ mutex

pthread_mutex_t cache_t::mutex

Mutex to protect access to the structure.

◆ name

char* cache_t::name

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

◆ ptr

void** cache_t::ptr

List of pointers to available buffers in this cache.


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