comparison src/alloc.c @ 4938:299dce99bdad

(for main branch) when freeing check against DEADBEEF_CONSTANT since that's what we use elsewhere
author Ben Wing <ben@xemacs.org>
date Tue, 19 Jan 2010 11:25:37 -0600
parents 714f7c9fabb1
children 19a72041c5ed
comparison
equal deleted inserted replaced
4937:195ceb7d6229 4938:299dce99bdad
270 do \ 270 do \
271 { \ 271 { \
272 /* Unbelievably, calling free() on 0xDEADBEEF doesn't cause an \ 272 /* Unbelievably, calling free() on 0xDEADBEEF doesn't cause an \
273 error until much later on for many system mallocs, such as \ 273 error until much later on for many system mallocs, such as \
274 the one that comes with Solaris 2.3. FMH!! */ \ 274 the one that comes with Solaris 2.3. FMH!! */ \
275 assert (block != (void *) 0xDEADBEEF); \ 275 assert (block != (void *) DEADBEEF_CONSTANT); \
276 MALLOC_BEGIN (); \ 276 MALLOC_BEGIN (); \
277 } \ 277 } \
278 while (0) 278 while (0)
279 #else /* not NEW_GC */ 279 #else /* not NEW_GC */
280 #define FREE_OR_REALLOC_BEGIN(block) \ 280 #define FREE_OR_REALLOC_BEGIN(block) \
281 do \ 281 do \
282 { \ 282 { \
283 /* Unbelievably, calling free() on 0xDEADBEEF doesn't cause an \ 283 /* Unbelievably, calling free() on 0xDEADBEEF doesn't cause an \
284 error until much later on for many system mallocs, such as \ 284 error until much later on for many system mallocs, such as \
285 the one that comes with Solaris 2.3. FMH!! */ \ 285 the one that comes with Solaris 2.3. FMH!! */ \
286 assert (block != (void *) 0xDEADBEEF); \ 286 assert (block != (void *) DEADBEEF_CONSTANT); \
287 /* You cannot free something within dumped space, because there is \ 287 /* You cannot free something within dumped space, because there is \
288 no longer any sort of malloc structure associated with the block. \ 288 no longer any sort of malloc structure associated with the block. \
289 If you are tripping this, you may need to conditionalize on \ 289 If you are tripping this, you may need to conditionalize on \
290 DUMPEDP. */ \ 290 DUMPEDP. */ \
291 assert (!DUMPEDP (block)); \ 291 assert (!DUMPEDP (block)); \