forked from The-OpenROAD-Project-Attic/flute
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflute_malloc.h
More file actions
30 lines (21 loc) · 767 Bytes
/
flute_malloc.h
File metadata and controls
30 lines (21 loc) · 767 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
/* -----------------------------------------------------------------
* Copyright (c) 2019 William Swartz. UTD. All rights reserved.
----------------------------------------------------------------- */
#ifndef FLUTE_MALLOC_H
#define FLUTE_MALLOC_H
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif /* HAVE_STDLIB_H */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifndef UTDMALLOC
#define UTDMALLOC(n, els) (els *) malloc((n)*sizeof(els))
#define UTDCALLOC(n, els) (els *) calloc(n, sizeof(els))
#define UTDREALLOC(ar,n,els) (els *) realloc(ar,(n)*sizeof(els))
#define UTDFREE(els) free(els)
#endif /* UTDMALLOC */
#ifdef __cplusplus
} ;
#endif /* __cplusplus */
#endif /* FLUTE_MALLOC_H */