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.
 
void(* free )(void *data, void *element)
 Function to free memory back to the mempool.
 
void *(* alloc )(void *data, unsigned int size)
 Function to allocate memory from the mempool.
 
void *(* realloc )(void *data, void *element, unsigned int size)
 Function to change the size of a block of memory that is currently allocated.
 
void(* garbage_collect )(void *data)
 Function to trigger a garbage collection; can be NULL if the feature isn't available in the backend.
 
void(* statistics )(void *data)
 Report statistics on the content of the mempool; can be NULL if the feature isn't available in the backend.
 
void(* shutdown )(void *data)
 Function to destroy the backend, freeing memory back to the operating system.
 
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

◆ 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