#include "ks_config.h"
#include "ks_malloc.h"
#include <stdlib.h>
Go to the source code of this file.
Functions | |
| void | ks_malloc_set (ks_malloc_t m, ks_realloc_t r, ks_free_t f) |
| void * | ks_malloc (size_t size) |
| void * | ks_realloc (void *ptr, size_t size) |
| void | ks_free (void *ptr) |
Definitions of the libkarmaclient memory management functions. These functions provide wrappers around memory management functions that share the malloc(3), realloc(3) and free(3) prototypes.
Definition in file ks_malloc.c.
|
|
Free the memory pointed to by ptr.
Definition at line 122 of file ks_malloc.c. Referenced by ks_array_fini(), ks_array_free(), ks_assoc_free(), ks_bquery_free(), ks_number_free(), ks_response_free(), ks_socket_free(), ks_socket_send(), ks_socket_set_auth(), and ks_string_free(). |
|
|
Allocate a size bytes of memory using the allocation function given to ks_malloc_set().
Definition at line 92 of file ks_malloc.c. Referenced by ks_array_init(), ks_array_new(), ks_assoc_new(), ks_bquery_new(), ks_number_new(), ks_socket_new(), ks_socket_send(), ks_socket_set_auth(), and ks_string_new(). |
|
||||||||||||||||
|
Initialise the functions that are actually used for allocating reallocating and freeing allocated memory. If this function is not called, libkarmaclient defaults to using malloc(3), realloc(3) and free(3).
Definition at line 75 of file ks_malloc.c. |
|
||||||||||||
|
Allocate a new block of size bytes memory for the object pointed to be ptr.
Definition at line 109 of file ks_malloc.c. Referenced by ks_array_extend(), and ks_string_append(). |
1.4.4