-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathnoduma.h
205 lines (158 loc) · 3.31 KB
/
noduma.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
/*
* DUMA - Red-Zone memory allocator.
* Copyright (C) 2002-2009 Hayati Ayguen <h_ayguen@web.de>, Procitec GmbH
* Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com>
* License: GNU GPL (GNU General Public License, see COPYING-GPL)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* FILE CONTENTS:
* header file for inclusion from YOUR application code.
* Include this header before including foreign includes
* from inside your own headers files.
*/
/* remove previous DUMA definitions */
#ifdef DUMA_newFrame
#undef DUMA_newFrame
#endif
#ifdef DUMA_delFrame
#undef DUMA_delFrame
#endif
#ifdef DUMA_SET_ALIGNMENT
#undef DUMA_SET_ALIGNMENT
#endif
#ifdef DUMA_SET_PROTECT_BELOW
#undef DUMA_SET_PROTECT_BELOW
#endif
#ifdef DUMA_SET_FILL
#undef DUMA_SET_FILL
#endif
/* remove previous wrappers to standard C functions */
#ifdef malloc
#undef malloc
#endif
#ifdef calloc
#undef calloc
#endif
#ifdef free
#undef free
#endif
#ifdef memalign
#undef memalign
#endif
#ifdef posix_memalign
#undef posix_memalign
#endif
#ifdef realloc
#undef realloc
#endif
#ifdef valloc
#undef valloc
#endif
#ifdef malloc_usable_size
#undef malloc_usable_size
#endif
#ifdef strdup
#undef strdup
#endif
#ifdef memcpy
#undef memcpy
#endif
#ifdef memmove
#undef memmove
#endif
#ifdef strcpy
#undef strcpy
#endif
#ifdef strncpy
#undef strncpy
#endif
#ifdef strcat
#undef strcat
#endif
#ifdef strncat
#undef strncat
#endif
#ifndef SKIP_DUMA_NO_CXX
/* remove previous wrappers to standard C++ functions / operators */
#ifdef new
#undef new
#endif
#ifdef delete
#undef delete
#endif
#ifdef new_NOTHROW
#undef new_NOTHROW
#endif
/* remove previous DUMA C++ definitions */
#ifdef NEW_ELEM
#undef NEW_ELEM
#endif
#ifdef NEW_ARRAY
#undef NEW_ARRAY
#endif
#ifdef NEW_ELEM_NOTHROW
#undef NEW_ELEM_NOTHROW
#endif
#ifdef NEW_ARRAY_NOTHROW
#undef NEW_ARRAY_NOTHROW
#endif
#ifdef DEL_ELEM
#undef DEL_ELEM
#endif
#ifdef DEL_ARRAY
#undef DEL_ARRAY
#endif
#ifdef DEL_ELEM_NOTHROW
#undef DEL_ELEM_NOTHROW
#endif
#ifdef DEL_ARRAY_NOTHROW
#undef DEL_ARRAY_NOTHROW
#endif
#endif /* SKIP_DUMA_NO_CXX */
/* remove definitions for protection of functions return address */
#ifdef DUMA_FN_PROT_START
#undef DUMA_FN_PROT_START
#endif
#ifdef DUMA_FN_PROT_END
#undef DUMA_FN_PROT_END
#endif
#ifdef DUMA_FN_PROT_RET
#undef DUMA_FN_PROT_RET
#endif
#ifdef DUMA_FN_PROT_RET_VOID
#undef DUMA_FN_PROT_RET_VOID
#endif
/* remove (C)hecked (A)rray definitions */
#ifdef CA_DECLARE
#undef CA_DECLARE
#endif
#ifdef CA_DEFINE
#undef CA_DEFINE
#endif
#ifdef CA_REF
#undef CA_REF
#endif
/* Following defines are kept:
*
* DUMA_ASSERT
* DUMA_CHECK
* DUMA_CHECKALL
* DUMA_CDECL
* DUMA_SIZE_T
* DUMA_MAX_DEL_DEPTH
*
*/