/*
memory checking system derived from Dr Dobbs Journal
*/


extern int Mem_crash;	/* should we crash if malloc et al fail? */
			/* No if = 0; Yes, with Mem_crash = exit status */
			/* By default; Yes, exit status 1 */


extern void * Mem_malloc( size_t size, char * file, int line );
extern void * Mem_xmalloc( size_t size, char * file, int line );
extern void * Mem_xdatadup( size_t size, void * data, char * file, int line );
extern void * Mem_calloc( size_t n, size_t size, char * file, int line );
extern void * Mem_realloc( void * p, size_t size, char * file, int line );
extern char * Mem_strdup( char * p, char * file, int line );
extern char * Mem_xstrdup( char * p, char * file, int line );
extern void Mem_free( void * p, char * file, int line );
extern size_t Mem_used( void );
extern void Mem_show( FILE * f );
extern void Mem_check( void );
extern void Mem_exit( int n );
