Data Fields
_Eina_Mempool_Backend Struct Reference

Data Fields

const char * name
 Name of the mempool backend.
 
void *(* init )(const char *context, const char *options, va_list args)
 Function to initialize the backend. More...
 
void(* free )(void *data, void *element)
 Function to free memory back to the mempool. More...
 
void *(* alloc )(void *data, unsigned int size)
 Function to allocate memory from the mempool. More...
 
void *(* realloc )(void *data, void *element, unsigned int size)
 Function to change the size of a block of memory that is currently allocated. More...
 
void(* garbage_collect )(void *data)
 Function to trigger a garbage collection; can be NULL if the feature isn't available in the backend. More...
 
void(* statistics )(void *data)
 Report statistics on the content of the mempool; can be NULL if the feature isn't available in the backend. More...
 
void(* shutdown )(void *data)
 Function to destroy the backend, freeing memory back to the operating system. More...
 
void(* repack )(void *data, Eina_Mempool_Repack_Cb cb, void *cb_data)
 Function to optimize the placement of objects in the mempool (it's different from garbage_collect); can be NULL if the feature isn't available in the backend. More...
 
Eina_Bool(* from )(void *data, void *element)
 Function to check is a valid element from a mempool. More...
 
Eina_Iterator *(* iterator )(void *data)
 Function to get an Eina_Iterator that will walk every allocated element in the pool. More...
 
void *(* alloc_near )(void *data, void *after, void *before, unsigned int size)
 Function to allocate memory near already allocated memory. More...
 

Field Documentation

◆ init

void*(* _Eina_Mempool_Backend::init) (const char *context, const char *options, va_list args)

Function to initialize the backend.

◆ free

void(* _Eina_Mempool_Backend::free) (void *data, void *element)

Function to free memory back to the mempool.

◆ alloc

void*(* _Eina_Mempool_Backend::alloc) (void *data, unsigned int size)

Function to allocate memory from the mempool.

◆ realloc

void*(* _Eina_Mempool_Backend::realloc) (void *data, void *element, unsigned int size)

Function to change the size of a block of memory that is currently allocated.

◆ garbage_collect

void(* _Eina_Mempool_Backend::garbage_collect) (void *data)

Function to trigger a garbage collection; can be NULL if the feature isn't available in the backend.

◆ statistics

void(* _Eina_Mempool_Backend::statistics) (void *data)

Report statistics on the content of the mempool; can be NULL if the feature isn't available in the backend.

◆ shutdown

void(* _Eina_Mempool_Backend::shutdown) (void *data)

Function to destroy the backend, freeing memory back to the operating system.

◆ repack

void(* _Eina_Mempool_Backend::repack) (void *data, Eina_Mempool_Repack_Cb cb, void *cb_data)

Function to optimize the placement of objects in the mempool (it's different from garbage_collect); can be NULL if the feature isn't available in the backend.

See also
Eina_Mempool_Repack_Cb

◆ from

Eina_Bool(* _Eina_Mempool_Backend::from) (void *data, void *element)

Function to check is a valid element from a mempool.

See also
eina_mempool_from

◆ iterator

Eina_Iterator*(* _Eina_Mempool_Backend::iterator) (void *data)

Function to get an Eina_Iterator that will walk every allocated element in the pool.

See also
eina_mempool_iterator_new

◆ alloc_near

void*(* _Eina_Mempool_Backend::alloc_near) (void *data, void *after, void *before, unsigned int size)

Function to allocate memory near already allocated memory.

Since
1.24
See also
eina_mempool_malloc_near