extern void *realloc_after_dump_9x(void *, size_t);
extern void free_after_dump_9x(void *);
+extern void *sys_calloc(size_t, size_t);
+
extern malloc_fn the_malloc_fn;
extern realloc_fn the_realloc_fn;
extern free_fn the_free_fn;
#define malloc(size) (*the_malloc_fn)(size)
#define free(ptr) (*the_free_fn)(ptr)
#define realloc(ptr, size) (*the_realloc_fn)(ptr, size)
+#define calloc(num, size) sys_calloc(num, size)
#endif
}
}
+void *
+sys_calloc (size_t number, size_t size)
+{
+ size_t nbytes = number * size;
+ void *ptr = (*the_malloc_fn) (nbytes);
+ if (ptr)
+ memset (ptr, 0, nbytes);
+ return ptr;
+}
+
#if defined HAVE_UNEXEC && defined ENABLE_CHECKING
void
report_temacs_memory_usage (void)