0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-06-30 22:19:29 -04:00
elinks/src/util/memdebug.h
Petr Baudis 0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00

30 lines
645 B
C

/* $Id: memdebug.h,v 1.5 2004/10/13 15:34:47 zas Exp $ */
#ifndef EL__UTIL_MEMDEBUG_H
#define EL__UTIL_MEMDEBUG_H
#ifdef DEBUG_MEMLEAK
/* TODO: Another file? */
struct mem_stats {
long true_amount;
long amount;
};
extern struct mem_stats mem_stats;
void *debug_mem_alloc(unsigned char *, int, size_t);
void *debug_mem_calloc(unsigned char *, int, size_t, size_t);
void debug_mem_free(unsigned char *, int, void *);
void *debug_mem_realloc(unsigned char *, int, void *, size_t);
void set_mem_comment(void *, unsigned char *, int);
void check_memory_leaks(void);
#else
#define set_mem_comment(p, c, l)
#endif /* DEBUG_MEMLEAK */
#endif