From 3577eb6f136bf2b394c2ce839fc098da5faa9fd5 Mon Sep 17 00:00:00 2001 From: Waldemar Celes Date: Mon, 28 Mar 1994 12:14:02 -0300 Subject: Acrescentar o include do gerenciador de memoria "mm". --- mm.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 mm.h (limited to 'mm.h') diff --git a/mm.h b/mm.h new file mode 100644 index 00000000..40fdf84d --- /dev/null +++ b/mm.h @@ -0,0 +1,39 @@ +/* +** mm.h +** Waldemar Celes Filho +** Sep 16, 1992 +*/ + + +#ifndef mm_h +#define mm_h + +#include + +#ifdef _MM_ + +/* switch off the debugger functions */ +#define malloc(s) MmMalloc(s,__FILE__,__LINE__) +#define calloc(n,s) MmCalloc(n,s,__FILE__,__LINE__) +#define realloc(a,s) MmRealloc(a,s,__FILE__,__LINE__,#a) +#define free(a) MmFree(a,__FILE__,__LINE__,#a) +#define strdup(s) MmStrdup(s,__FILE__,__LINE__) +#endif + +typedef void (*Ferror) (char *); + +/* Exported functions */ +void MmInit (Ferror f, Ferror w); +void *MmMalloc (unsigned size, char *file, int line); +void *MmCalloc (unsigned n, unsigned size, char *file, int line); +void MmFree (void *a, char *file, int line, char *var); +void *MmRealloc (void *old, unsigned size, char *file, int line, char *var); +char *MmStrdup (char *s, char *file, int line); +unsigned MmGetBytes (void); +void MmListAllocated (void); +void MmCheck (void); +void MmStatistics (void); + + +#endif + -- cgit v1.2.3-55-g6feb