36#include "libical_ical_export.h"
139typedef void *(*icalmemory_malloc_f)(size_t);
140typedef void *(*icalmemory_realloc_f)(
void *, size_t);
141typedef void (*icalmemory_free_f)(
void *);
160 icalmemory_realloc_f f_realloc,
161 icalmemory_free_f f_free);
174 icalmemory_realloc_f *f_realloc, icalmemory_free_f *f_free);
void icalmemory_free_ring(void)
Frees all memory used in the ring.
Definition: icalmemory.c:215
void icalmemory_free_buffer(void *buf)
Releases a buffer.
Definition: icalmemory.c:359
char * icalmemory_strdup(const char *s)
Creates a duplicate of a string.
Definition: icalmemory.c:249
void icalmemory_append_string(char **buf, char **pos, size_t *buf_size, const char *string)
Appends a string to a buffer.
Definition: icalmemory.c:369
void * icalmemory_resize_buffer(void *buf, size_t size)
Resizes a buffer created with icalmemory_new_buffer().
Definition: icalmemory.c:340
void * icalmemory_new_buffer(size_t size)
Creates new buffer with the specified size.
Definition: icalmemory.c:319
char * icalmemory_tmp_copy(const char *str)
Creates a copy of the given string, stored on the ring buffer, and returns it.
Definition: icalmemory.c:232
void icalmemory_append_char(char **buf, char **pos, size_t *buf_size, char ch)
Appends a character to a buffer.
Definition: icalmemory.c:411
void icalmemory_get_mem_alloc_funcs(icalmemory_malloc_f *f_malloc, icalmemory_realloc_f *f_realloc, icalmemory_free_f *f_free)
Returns the functions used for memory management.
Definition: icalmemory.c:300
void icalmemory_add_tmp_buffer(void *buf)
Adds an externally allocated buffer to the ring.
Definition: icalmemory.c:167
void icalmemory_set_mem_alloc_funcs(icalmemory_malloc_f f_malloc, icalmemory_realloc_f f_realloc, icalmemory_free_f f_free)
Configures the functions to use for memory management.
Definition: icalmemory.c:291
void * icalmemory_tmp_buffer(size_t size)
Creates a new temporary buffer on the ring and returns it.
Definition: icalmemory.c:193