summaryrefslogtreecommitdiffstats
path: root/polyp/xmalloc.h
blob: eaf8f708bdf6a4505934fcda6d3c2330bf63e053 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef foomemoryhfoo
#define foomemoryhfoo

#include <sys/types.h>
#include <stdlib.h>

void* pa_xmalloc(size_t l);
void *pa_xmalloc0(size_t l);
void *pa_xrealloc(void *ptr, size_t size);
#define pa_xfree free

char *pa_xstrdup(const char *s);
char *pa_xstrndup(const char *s, size_t l);

void* pa_xmemdup(const void *p, size_t l);

#endif