# endif
# ifdef REDIRECT_REALLOC
+
+/* As with malloc, avoid two levels of extra calls here. */
+# ifdef GC_ADD_CALLER
+# define RA GC_RETURN_ADDR,
+# else
+# define RA
+# endif
+# define GC_debug_realloc_replacement(p, lb) \
+ GC_debug_realloc(p, lb, RA "unknown", 0)
+
# ifdef __STDC__
GC_PTR realloc(GC_PTR p, size_t lb)
# else
{
return(REDIRECT_REALLOC(p, lb));
}
+
+# undef GC_debug_realloc_replacement
# endif /* REDIRECT_REALLOC */
-/* The same thing, except caller does not hold allocation lock. */
+/* Allocate memory such that only pointers to near the */
+/* beginning of the object are considered. */
/* We avoid holding allocation lock while we clear memory. */
ptr_t GC_generic_malloc_ignore_off_page(lb, k)
register size_t lb;
if (0 == result) {
return((*GC_oom_fn)(lb));
} else {
- if (init & !GC_debugging_started) {
+ if (init && !GC_debugging_started) {
BZERO(result, n_blocks * HBLKSIZE);
}
return(result);