/* --------------------------------------------------- */
/* Header-file BASIS 1.0, (C) Wabnig Harald, 25.5.2002 */
/* --------------------------------------------------- */

#ifndef MYMEMORY_INCLUDE
#define MYMEMORY_INCLUDE

#include <stdlib.h>
#include <msglog.h>

#include "boolean.h"

/* ------------------------- */
/* memory-checking functions */
/* ------------------------- */

/* max. number of mallocs that can be checked */
#define MALLOC_MAX		10000

extern void init_check();
extern void begin_check();
extern void end_check();
extern void print_check();
extern void free_check();

extern void memstat_on();
extern void memstat_off();
extern void print_memstat();

/* ------------------------- */
/* memory-handling functions */
/* ------------------------- */

/* these functions check out-of-memory-errors and exit with
   return-code 1 in this case */

extern void * mymalloc(int size);
extern void * myrealloc(void * ptr, int size);
extern char * mystrdup(char * strg);
extern void myfree(void * ptr);

#endif
