extern int errno;
extern FILE *journal;
-extern char *malloc();
-extern int free();
extern char *inet_ntoa();
extern void mr_com_err();
extern void do_client();
extern time_t now;
+#ifdef _DEBUG_MALLOC_INC
+static char *dbg_malloc();
+static int dbg_free();
+#endif
+
/*
* Main MOIRA server loop.
*
/* Profiling implies that getting rid of one level of call
* indirection here wins us maybe 1% on the VAX.
*/
+#ifdef _DEBUG_MALLOC_INC
+ gdb_amv = dbg_malloc;
+ gdb_fmv = dbg_free;
+#else
gdb_amv = malloc;
- gdb_fmv = free;
+ gdb_fmv = (int (*)()) free;
+#endif
/*
* GDB initialization.
exit(1);
}
}
+
+#ifdef _DEBUG_MALLOC_INC
+static char *dbg_malloc(size)
+ SIZETYPE size;
+{
+ return( debug_malloc("somewhere in the gdb code",1,size) );
+}
+
+static int dbg_free(cptr)
+ DATATYPE *cptr;
+{
+ debug_free((char *)NULL, 0, cptr);
+ return 0; /* GDB is being stupid */
+}
+#endif
+