tbamud/src/zmalloc.h

27 lines
721 B
C
Raw Normal View History

/* Zmalloc, a simple memory-allocation monitor.
2006-12-19 22:56:18 +00:00
**
** Copyright 1996 Eric Murray, ericm@lne.com
**
** You may make free use of this code but please give me credit.
**
** $Id: zmalloc.h,v 1.1 1998/05/25 16:31:35 ericm Exp $
** $Log: zmalloc.h,v $
** Revision 1.1 1998/05/25 16:31:35 ericm
** Initial revision */
2006-12-19 22:56:18 +00:00
#ifndef ZMALLOC_H
#define ZMALLOC_H
int *zmalloc(int, char *, int);
void zfree(int *, char *, int);
int zmalloc_check();
char *zstrdup(const char*, char*, int);
#define malloc(x) zmalloc((x),__FILE__,__LINE__)
#define calloc(n,x) zmalloc((n*x),__FILE__,__LINE__)
#define free(x) zfree((int *)(x),__FILE__,__LINE__)
#undef strdup
#define strdup(x) zstrdup((x), __FILE__, __LINE__)
#endif /* ZMALLOC_H */