YAC 3.7.1
Yet Another Coupler
Loading...
Searching...
No Matches
xmalloc.c File Reference

fail-safe [cm]alloc wrappers More...

#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "ppm/ppm_xfuncs.h"
#include "ppm/core.h"
#include "ppm/symprefix.h"
Include dependency graph for xmalloc.c:

Go to the source code of this file.

Macros

#define TEST_POINTER(SIZE)
 

Functions

void *symprefix xcalloc (size_t nmemb, size_t size, const char *source, int line)
 
void *symprefix xmalloc (size_t size, const char *source, int line)
 
void *symprefix xrealloc (void *ptr, size_t size, const char *source, int line)
 

Detailed Description

fail-safe [cm]alloc wrappers

Version
1.0
Author
Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Definition in file xmalloc.c.

Macro Definition Documentation

◆ TEST_POINTER

#define TEST_POINTER ( SIZE)
Value:
if (p || !(SIZE)) \
; \
else \
symprefix(abort_message)(strerror(errno), source, line);
void symprefix abort_message(const char *msg, const char *source, int line)
Definition core.c:100
double(* p)(double lon, double lat)
Definition toy_scrip.c:119

Definition at line 55 of file xmalloc.c.

Function Documentation

◆ xcalloc()

void *symprefix xcalloc ( size_t nmemb,
size_t size,
const char * source,
int line )

Definition at line 65 of file xmalloc.c.

◆ xmalloc()

void *symprefix xmalloc ( size_t size,
const char * source,
int line )

Definition at line 74 of file xmalloc.c.

◆ xrealloc()

void *symprefix xrealloc ( void * ptr,
size_t size,
const char * source,
int line )

Definition at line 83 of file xmalloc.c.