view src/ploki/xmalloc.h @ 12267:7e5beba54694 draft

<b_jonas> slashlearn aoc//Advent of Code (AoC) is a series of programming puzzles that some regulars enjoy, found at "https://adventofcode.com/2019/about".
author HackEso <hackeso@esolangs.org>
date Mon, 16 Dec 2019 22:53:41 +0000
parents ac0403686959
children
line wrap: on
line source

#ifndef XMALLOC_H_
#define XMALLOC_H_

#include "config.h"

#include <stddef.h>

void xend(void);
#if DEBUG_P
void *xmalloc(size_t, size_t, const char *, unsigned);
void *xrealloc(void *, size_t, const char *, unsigned);
#define xmalloc(n, m) xmalloc(n, m, __FILE__, __LINE__)
#define xrealloc(p, n) xrealloc(p, n, __FILE__, __LINE__)
#else
void *xmalloc(size_t, size_t);
void *xrealloc(void *, size_t);
#endif
void xfree(void *);

#endif /* XMALLOC_H_ */