#
# Sample Malloc rc file for the debug malloc library
# Rename this to .mallocrc and place in your $HOME directory to
# activate.  See malloc.info for more information.
#
# $Id: mallocrc,v 1.22 1994/04/07 03:03:51 gray Exp $
#

#
# This file maps tags to certain combinations of tokens.  The tags
# here are only provided as an example.  You are supposed to roll your
# own.  Lines in this file should have the form:
#
#	tag	token1, token2, ...
#
# To use the above line you say 'malloc_dbg tag' which enables the
# debugging facilities token1, token2, ...  You must pass the output
# from malloc_dbg through your shell's eval command to change your
# environment.  See malloc.info for more information.
#
# Lines can end with a \ meaning it continues onto the next line.
# Lines beginning with '#' or empty lines are ignored
#

#
# Token:			Description:
###########################################################################
# none				no debugging functionality
#
# log-stats			log general statistics
# log-non-free			log non-freed memory pointers on shutdown
# log-error			log error codes and messages
# log-trans			log memory transactions
# log-stamp			log a time stamp for all messages
# log-admin			log full administrative information
# log-blocks			log detailed block information in heap_map
# log-unknown			log unknown non-freed memory pointers too
# log-bad-space			log actual bytes from bad pointers
# log-nonfree-space		log actual bytes in non-freed pointers
#
# check-fence			check fence-post areas
# check-heap			do general heap checking
# check-lists			verify internal heap linked-lists
# check-free			check to see if free space has been overwritten
# check-funcs			check the arguments of some routines
#
# realloc-copy			always copy data to a new pointer when realloc
# free-blank			overwrite space that is freed
# error-abort			abort the program (and dump core) on errors
# alloc-blank			overwrite space that is to be alloced
# heap-check-map		log a heap-map every time the heap is checked
# print-error			dump errors and messages to STDERR
# catch-null			abort program if library can't get sbrk space
# never-reuse			never reuse memory that has been freed
# allow-nonlinear		allow non-linear heap space
#

# no debugging (for disabling memory checking)
none		none

# basic runtime without fence over-head
production	log-stats, log-non-free, log-error, log-blocks, \
		log-bad-space, log-unknown, \
		catch-null

# basic runtime
runtime		log-stats, log-non-free, log-error, log-blocks, \
		log-bad-space, log-unknown, \
		check-fence, \
		catch-null

# basic tests
1		log-stats, log-non-free, log-error, log-blocks, \
		log-bad-space, log-unknown, \
		check-fence, \
		free-blank, error-abort, alloc-blank, catch-null

# extensive checking
2		log-stats, log-non-free, log-error, log-blocks, \
		log-bad-space, log-unknown, \
		check-fence, check-heap, check-lists, \
		realloc-copy, free-blank, error-abort, alloc-blank, \
		catch-null

# ultra-extensive checking
3		log-stats, log-non-free, log-error, log-blocks, \
		log-bad-space, log-unknown, \
		check-fence, check-heap, check-lists, check-free, \
		realloc-copy, free-blank, error-abort, alloc-blank, \
		catch-null

# ultra-extensive checking + funcs
4		log-stats, log-non-free, log-error, log-blocks, \
		log-bad-space, log-unknown, \
		check-fence, check-heap, check-lists, check-free, \
		check-funcs, \
		realloc-copy, free-blank, error-abort, alloc-blank, \
		catch-null

# full logging of statistics
log		log-stats, log-non-free, log-error, log-trans, log-admin, \
		log-blocks, log-unknown, log-bad-space, \
		check-fence, \
		catch-null

# log detailed map entries
map		log-stats, log-non-free, log-error, log-blocks, \
		log-bad-space, log-unknown, \
		check-fence, check-heap, \
		catch-null, heap-check-map

# immediate logging of problems in a text-based programs
text		log-error, log-bad-space, log-unknown, \
		check-fence, \
		catch-null, print-error

# full logging of statistics in text programs
verbose		log-stats, log-non-free, log-error, log-trans, log-admin, \
		log-blocks, log-unknown, log-bad-space, \
		check-fence, \
		catch-null, print-error

# the kitchen-sink
all		log-stats, log-non-free, log-error, log-trans, log-stamp, \
		log-admin, log-blocks, log-unknown, log-bad-space, \
		check-fence, check-heap, check-lists, check-free, \
		check-funcs, \
		realloc-copy, free-blank, error-abort, alloc-blank, \
		heap-check-map, print-error, catch-null, never-reuse

# NOTE: for specific occasions: allow-nonlinear
