dhcpd-pools  3.0
ISC dhcpd lease usage analyser
Macros | Functions
xalloc.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "xalloc-oversized.h"
Include dependency graph for xalloc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define XALLOC_INLINE   _GL_INLINE
 
#define _GL_ATTRIBUTE_MALLOC
 
#define _GL_ATTRIBUTE_ALLOC_SIZE(args)
 
#define XMALLOC(t)   ((t *) xmalloc (sizeof (t)))
 
#define XNMALLOC(n, t)   ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))))
 
#define XZALLOC(t)   ((t *) xzalloc (sizeof (t)))
 
#define XCALLOC(n, t)   ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
 

Functions

_Noreturn void xalloc_die (void)
 
void * xmalloc (size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE((1))
 
void * xzalloc (size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE((1))
 
void * xcalloc (size_t n, size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE((1
 
void void * xrealloc (void *p, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE((2))
 
void * x2realloc (void *p, size_t *pn)
 
void * xmemdup (void const *p, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE((2))
 
char * xstrdup (char const *str) _GL_ATTRIBUTE_MALLOC
 
XALLOC_INLINE void * xnmalloc (size_t n, size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE((1
 
XALLOC_INLINE void * xnrealloc (void *p, size_t n, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE((2
 
XALLOC_INLINE void * x2nrealloc (void *p, size_t *pn, size_t s)
 
XALLOC_INLINE char * xcharalloc (size_t n) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE((1))
 

Macro Definition Documentation

◆ _GL_ATTRIBUTE_ALLOC_SIZE

#define _GL_ATTRIBUTE_ALLOC_SIZE (   args)

Referenced by x2nrealloc(), and xnmalloc().

◆ _GL_ATTRIBUTE_MALLOC

#define _GL_ATTRIBUTE_MALLOC

◆ XALLOC_INLINE

#define XALLOC_INLINE   _GL_INLINE

Referenced by x2nrealloc(), xnmalloc(), and xnrealloc().

◆ XCALLOC

#define XCALLOC (   n,
 
)    ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))

◆ XMALLOC

#define XMALLOC (   t)    ((t *) xmalloc (sizeof (t)))

◆ XNMALLOC

#define XNMALLOC (   n,
 
)    ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))))

Referenced by xcharalloc().

◆ XZALLOC

#define XZALLOC (   t)    ((t *) xzalloc (sizeof (t)))

Function Documentation

◆ x2nrealloc()

XALLOC_INLINE void* x2nrealloc ( void *  p,
size_t *  pn,
size_t  s 
)

Referenced by x2realloc(), and xcharalloc().

Here is the call graph for this function:

◆ x2realloc()

void* x2realloc ( void *  p,
size_t *  pn 
)

Referenced by xcharalloc().

Here is the call graph for this function:

◆ xalloc_die()

_Noreturn void xalloc_die ( void  )

Referenced by quotearg_n_options(), x2nrealloc(), xcalloc(), xmalloc(), xnmalloc(), xnrealloc(), and xrealloc().

Here is the call graph for this function:

◆ xcalloc()

void* xcalloc ( size_t  n,
size_t  s 
)

◆ xcharalloc()

XALLOC_INLINE char * xcharalloc ( size_t  n)

Referenced by quotearg_alloc_mem(), quotearg_n_options(), and x2nrealloc().

Here is the call graph for this function:

◆ xmalloc()

void* xmalloc ( size_t  s)

◆ xmemdup()

void* xmemdup ( void const *  p,
size_t  s 
)

Referenced by clone_quoting_options(), xcharalloc(), and xstrdup().

Here is the call graph for this function:

◆ xnmalloc()

XALLOC_INLINE void XALLOC_INLINE void * xnmalloc ( size_t  n,
size_t  s 
)
Here is the call graph for this function:

◆ xnrealloc()

XALLOC_INLINE void XALLOC_INLINE void * xnrealloc ( void *  p,
size_t  n,
size_t  s 
)

Referenced by xcharalloc(), and xnmalloc().

Here is the call graph for this function:

◆ xrealloc()

void void* xrealloc ( void *  p,
size_t  s 
)

Referenced by parse_config(), quotearg_n_options(), x2nrealloc(), xcharalloc(), and xnrealloc().

Here is the call graph for this function:

◆ xstrdup()

char* xstrdup ( char const *  str)

Referenced by cidr_last_v4(), cidr_last_v6(), parse_config(), parse_leases(), and prepare_memory().

Here is the call graph for this function:

◆ xzalloc()

void* xzalloc ( size_t  s)
Here is the call graph for this function: