#ifndef SAFEMALLOC_H
#define SAFEMALLOC_H

/* temp because I know it will work on linux */
# define USE_POINTER_COMPARES 1

# ifdef SAFEMALLOC_C

# define MALLOC_MALLOC_GARBAGE 0xFFFA

#  ifdef EXTRA_MALLOC_WRAPPER

/* we only know the size if this is on */
#  define MALLOC_FREE_GARBAGE   0xFFFB

typedef struct malloc_lookup
{
 struct malloc_lookup *next;
 struct malloc_lookup *prev;
 void *mem_ref;
 const char *file_ref;
 unsigned int line_ref;
 unsigned int type;
 size_t size;
} malloc_lookup;

#  endif /* using warns */
# endif /* in the safemalloc file */


/* types for calling MALLOC with */
#define MALLOC_UNDEFINED 0
#define MALLOC_MULTI_NODE 1
#define MALLOC_MULTI_BASE 2
#define MALLOC_OUTPUT_NODE 3
#define MALLOC_PLAYER_TREE_NODE 4
#define MALLOC_PLAYER_LINKED_LIST 5
#define MALLOC_TWINKLE_INFO 6
#define MALLOC_ALIAS_NODE 7
#define MALLOC_NICKNAME_NODE 8
#define MALLOC_PLAYER_FILE 9
#define MALLOC_NEWS_GROUP 10
#define MALLOC_NEWS_ARTICLE 11
#define MALLOC_CHILD_COM 12

/* the size of the array to store the mallocs */
#define MALLOC_MAX_TYPES 13

#endif
