xine-lib: xine-lib-1.2.12/include/xine/pool.h File Reference

xine-lib 1.2.12

Typedefs | Functions
pool.h File Reference
`#include <stdlib.h>`
`#include <inttypes.h>`
`#include <xine/attributes.h>`

Go to the source code of this file.

## Typedefs
typedef struct xine_pool_s | xine_pool_t

## Functions
xine_pool_t * | xine_pool_new (size_t object_size, void(create_object)(void *object), void(prepare_object)(void *object), void(return_object)(void *object), void(delete_object)(void *object))
void | xine_pool_delete (xine_pool_t *pool)
void * | xine_pool_get (xine_pool_t *pool)
void | xine_pool_put (xine_pool_t *pool, void *object)

## Typedef Documentation

## ◆ xine_pool_t

typedef struct xine_pool_s xine_pool_t

## Function Documentation

## ◆ xine_pool_delete()

void xine_pool_delete | ( | xine_pool_t * | pool | ) |

References _x_assert, xine_pool_s::chunk_list, xine_pool_chunk_s::current_id, xine_pool_s::delete_object, xine_pool_chunk_s::mem_base, xine_pool_s::object_size, xine_array_get(), xine_array_size(), and xine_pool_delete_chunk().

Referenced by xine_ring_buffer_delete().

## ◆ xine_pool_get()

void * xine_pool_get | ( | xine_pool_t * | pool | ) |

References _x_assert, xine_pool_s::chunk_list, xine_pool_chunk_s::count, xine_pool_s::create_object, xine_pool_chunk_s::current_id, xine_pool_s::free_list, MAX_CHUNK_SIZE, xine_pool_chunk_s::mem_base, NULL, xine_pool_s::object_size, xine_pool_s::prepare_object, xine_array_add(), xine_array_get(), xine_array_remove(), xine_array_size(), and xine_pool_alloc_chunk().

Referenced by xine_ring_buffer_alloc(), and xine_ring_buffer_get().

## ◆ xine_pool_new()

xine_pool_t * xine_pool_new | ( | size_t | object_size,
|  | void(create_object)(void *object) | ,
|  | void(prepare_object)(void *object) | ,
|  | void(return_object)(void *object) | ,
|  | void(delete_object)(void *object) |
| ) |  |

## ◆ xine_pool_put()

void xine_pool_put | ( | xine_pool_t * | pool,
|  | void * | object
| ) |  |

References _x_assert, xine_pool_s::free_list, xine_pool_s::return_object, and xine_array_add().

Referenced by xine_ring_buffer_put(), and xine_ring_buffer_release().