/home/pvrabec/openscap/openscap-0.5.8/src/common/public/alloc.h File Reference

OpenScap allocation helpers. More...

#include <stdlib.h>
#include <assert.h>

Go to the source code of this file.

Memory allocation



#define __P   __attribute__ ((unused)) static
#define oscap_alloc(s)   __oscap_alloc_dbg (s, __PRETTY_FUNCTION__, __LINE__)
 malloc wrapper
#define oscap_calloc(n, s)   __oscap_calloc_dbg (n, s, __PRETTY_FUNCTION__, __LINE__)
 calloc wrapper
#define oscap_realloc(p, s)   __oscap_realloc_dbg ((void *)(p), s, __PRETTY_FUNCTION__, __LINE__)
 realloc wrapper
#define oscap_reallocf(p, s)   __oscap_reallocf_dbg ((void *)(p), s, __PRETTY_FUNCTION__, __LINE__)
 realloc wrapper freeing old memory on failure
#define oscap_free(p)   __oscap_free_dbg ((void **)((void *)&(p)), __PRETTY_FUNCTION__, __LINE__)
 free wrapper
#define oscap_talloc(T)   ((T *) oscap_alloc(sizeof(T)))
#define oscap_valloc(v)   ((typeof(v) *) oscap_alloc(sizeof v))
#define _A(x)   assert(x)
void * __oscap_alloc_dbg (size_t s, const char *f, size_t l)
__P void * oscap_alloc (size_t s)
void * __oscap_calloc_dbg (size_t n, size_t s, const char *f, size_t l)
__P void * oscap_calloc (size_t n, size_t s)
void * __oscap_realloc_dbg (void *p, size_t s, const char *f, size_t l)
__P void * oscap_realloc (void *p, size_t s)
void * __oscap_reallocf_dbg (void *p, size_t s, const char *f, size_t l)
__P void * oscap_reallocf (void *p, size_t s)
void __oscap_free_dbg (void **p, const char *f, size_t l)
__P void oscap_free (void *p)

Detailed Description

OpenScap allocation helpers.


Generated on 24 Mar 2010 for Open SCAP Library by  doxygen 1.6.1