<libroxml
version="3.0.2"
/>
|
XML internal memory management module. More...
Go to the source code of this file.
Functions | |
ROXML_STATIC ROXML_INT void | roxml_release_last (void *data) |
ROXML_STATIC ROXML_INT void | roxml_release_all (void *data) |
ROXML_STATIC ROXML_INT void | roxml_release_pointer (void *data) |
ROXML_API void | roxml_release (void *data) |
memory cleanning function | |
ROXML_INT void * | roxml_malloc (int size, int num, int type) |
alloc memory function | |
Variables | |
memory_cell_t | head_cell = { PTR_NONE, 0, NULL, 0, NULL, NULL } |
head of memory manager | |
XML internal memory management module.
(C) Copyright 2014 Tristan Lelong trist.nosp@m.an.l.nosp@m.elong.nosp@m.@lib.nosp@m.roxml.nosp@m..net
SPDX-Licence-Identifier: LGPL-2.1+ The author added a static linking exception, see License.txt.
Definition in file roxml_mem.c.
roxml_malloc | ( | int | size, |
int | num, | ||
int | type | ||
) |
alloc memory function
this function allocate some memory that will be reachable at any time by libroxml memory manager
size | the size of memory to allocate for each elem |
num | the number of element |
type | the kind of pointer |
Definition at line 124 of file roxml_mem.c.
ROXML_API void roxml_release | ( | void * | data | ) |
memory cleanning function
This function release the memory pointed by pointer just like free would but for memory allocated with roxml_malloc. Freeing a NULL pointer won't do anything. roxml_release also allow you to remove all previously allocated memory by using RELEASE_ALL as argument. You can also safely use RELEASE_LAST argument that will release the previously allocated varable within the current thread (making this function thread safe). if using roxml_release on a variable non roxml_mallocated, nothing will happen (ie variable won't be freed)
data | the pointer to delete or NULL or RELEASE_ALL or RELEASE_LAST |
Definition at line 109 of file roxml_mem.c.
|
inline |
Definition at line 54 of file roxml_mem.c.
|
inline |
Definition at line 18 of file roxml_mem.c.
|
inline |
Definition at line 78 of file roxml_mem.c.
memory_cell_t head_cell = { PTR_NONE, 0, NULL, 0, NULL, NULL } |
head of memory manager
Definition at line 16 of file roxml_mem.c.