-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzmalloc.h
More file actions
33 lines (21 loc) · 765 Bytes
/
zmalloc.h
File metadata and controls
33 lines (21 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/********************************************
zmalloc.h
copyright 1991,2014-2016 Michael D. Brennan
This is a source file for mawk, an implementation of
the AWK programming language.
Mawk is distributed without warranty under the terms of
the GNU General Public License, version 3, 2007.
If you import elements of this code into another product,
you agree to not name that product mawk.
********************************************/
#ifndef ZMALLOC_H
#define ZMALLOC_H
#include <stddef.h>
void* emalloc(size_t) ;
void* erealloc(void*,size_t) ;
void* zmalloc(size_t) ;
void* zrealloc(void*,size_t,size_t) ;
void zfree(void*,size_t) ;
#define ZMALLOC(type) ((type*)zmalloc(sizeof(type)))
#define ZFREE(p) zfree(p,sizeof(*(p)))
#endif /* ZMALLOC_H */