Functions
memory_pool.c File Reference
#include <stdlib.h>
#include <string.h>
#include "memory_pool.h"
Include dependency graph for memory_pool.c:

Go to the source code of this file.

Functions

static size_t calc_node_size (size_t element_size)
static node_tget_node_n (memory_pool_t *pool, node_t *head, u32 n)
element_tmemory_pool_add (memory_pool_t *pool)
s32 memory_pool_clear (memory_pool_t *pool)
void memory_pool_destroy (memory_pool_t *pool)
double memory_pool_dfold (memory_pool_t *pool, double x0, double(*f)(double x, element_t *elem))
u8 memory_pool_empty (memory_pool_t *pool)
float memory_pool_ffold (memory_pool_t *pool, float x0, float(*f)(float x, element_t *elem))
s32 memory_pool_filter (memory_pool_t *pool, void *arg, s8(*f)(void *arg, element_t *elem))
s32 memory_pool_fold (memory_pool_t *pool, void *x0, void(*f)(void *x, element_t *elem))
void memory_pool_group_by (memory_pool_t *pool, void *arg, s32(*cmp)(void *arg, element_t *a, element_t *b), void *x0, size_t x_size, void(*agg)(element_t *new, void *x, u32 n, element_t *elem))
s32 memory_pool_ifold (memory_pool_t *pool, s32 x0, s32(*f)(s32 x, element_t *elem))
s8 memory_pool_init (memory_pool_t *new_pool, u32 n_elements, size_t element_size, void *buff)
s32 memory_pool_map (memory_pool_t *pool, void *arg, void(*f)(void *arg, element_t *elem))
s32 memory_pool_n_allocated (memory_pool_t *pool)
u32 memory_pool_n_elements (memory_pool_t *pool)
s32 memory_pool_n_free (memory_pool_t *pool)
memory_pool_tmemory_pool_new (u32 n_elements, size_t element_size)
s32 memory_pool_product (memory_pool_t *pool, void *xs, u32 n_xs, size_t x_size, void(*prod)(element_t *new, void *x, u32 n_xs, u32 n, element_t *elem))
s32 memory_pool_product_generator (memory_pool_t *pool, void *x0, u32 max_xs, size_t x_size, s8(*next)(void *x, u32 n), void(*prod)(element_t *new, void *x, u32 n, element_t *elem))
void memory_pool_sort (memory_pool_t *pool, void *arg, s32(*cmp)(void *arg, element_t *a, element_t *b))
s32 memory_pool_to_array (memory_pool_t *pool, void *array)

Function Documentation

static size_t calc_node_size ( size_t  element_size) [inline, static]

Definition at line 18 of file memory_pool.c.

static node_t* get_node_n ( memory_pool_t pool,
node_t head,
u32  n 
) [inline, static]

Definition at line 23 of file memory_pool.c.



swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:55