Gromacs
2024.4
|
#include <cstddef>
Declarations for memory pooling functions.
This is an implementation header: there should be no need to use it outside this directory.
Typedefs | |
typedef struct gmx_sel_mempool_t | gmx_sel_mempool_t |
Opaque struct for memory pooling. More... | |
Functions | |
gmx_sel_mempool_t * | _gmx_sel_mempool_create () |
Create an empty memory pool. More... | |
void | _gmx_sel_mempool_destroy (gmx_sel_mempool_t *mp) |
Destroy a memory pool. More... | |
void * | _gmx_sel_mempool_alloc (gmx_sel_mempool_t *mp, size_t size) |
Allocate memory from a memory pool. More... | |
void | _gmx_sel_mempool_free (gmx_sel_mempool_t *mp, void *ptr) |
Release memory allocated from a memory pool. More... | |
void | _gmx_sel_mempool_reserve (gmx_sel_mempool_t *mp, size_t size) |
Set the size of a memory pool. More... | |
void | _gmx_sel_mempool_alloc_group (gmx_sel_mempool_t *mp, struct gmx_ana_index_t *g, int isize) |
Convenience function for allocating an index group from a memory pool. More... | |
void | _gmx_sel_mempool_free_group (gmx_sel_mempool_t *mp, struct gmx_ana_index_t *g) |
Convenience function for freeing an index group from a memory pool. More... | |
typedef struct gmx_sel_mempool_t gmx_sel_mempool_t |
Opaque struct for memory pooling.
void* _gmx_sel_mempool_alloc | ( | gmx_sel_mempool_t * | mp, |
size_t | size | ||
) |
Allocate memory from a memory pool.
void _gmx_sel_mempool_alloc_group | ( | gmx_sel_mempool_t * | mp, |
struct gmx_ana_index_t * | g, | ||
int | isize | ||
) |
Convenience function for allocating an index group from a memory pool.
gmx_sel_mempool_t* _gmx_sel_mempool_create | ( | ) |
Create an empty memory pool.
void _gmx_sel_mempool_destroy | ( | gmx_sel_mempool_t * | mp | ) |
Destroy a memory pool.
void _gmx_sel_mempool_free | ( | gmx_sel_mempool_t * | mp, |
void * | ptr | ||
) |
Release memory allocated from a memory pool.
void _gmx_sel_mempool_free_group | ( | gmx_sel_mempool_t * | mp, |
struct gmx_ana_index_t * | g | ||
) |
Convenience function for freeing an index group from a memory pool.
void _gmx_sel_mempool_reserve | ( | gmx_sel_mempool_t * | mp, |
size_t | size | ||
) |
Set the size of a memory pool.