Changeset 164 for trunk/include/helpers/memdebug.h
- Timestamp:
- May 13, 2002, 7:49:28 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/memdebug.h
r123 r164 43 43 44 44 #ifndef __stdlib_h // <stdlib.h> 45 #error stdlib.h must be included before memdebug.h. 45 // #error stdlib.h must be included before memdebug.h. 46 typedef unsigned int size_t; 47 #endif 48 49 #ifndef NULL 50 #if (defined(__EXTENDED__) || defined( __cplusplus )) 51 #define NULL 0 52 #else 53 #define NULL ((void *)0) 54 #endif 46 55 #endif 47 56 … … 146 155 147 156 #ifndef DONT_REPLACE_MALLOC 157 158 #ifdef malloc 159 #undef malloc 160 #endif 148 161 #define malloc(ul) memdMalloc(ul, __FILE__, __LINE__, __FUNCTION__) 162 163 #ifdef calloc 164 #undef calloc 165 #endif 149 166 #define calloc(n, size) memdCalloc(n, size, __FILE__, __LINE__, __FUNCTION__) 167 168 #ifdef realloc 169 #undef realloc 170 #endif 150 171 #define realloc(p, ul) memdRealloc(p, ul, __FILE__, __LINE__, __FUNCTION__) 172 173 #ifdef free 174 #undef free 175 #endif 151 176 #define free(p) memdFree(p, __FILE__, __LINE__, __FUNCTION__) 152 177 … … 159 184 #endif 160 185 186 // tell other headers that these have been replaced 161 187 #define __DEBUG_MALLOC_ENABLED__ 162 188
Note:
See TracChangeset
for help on using the changeset viewer.