-------------------------------------------------------------------------------
$Id: INSTALL,v 1.4 1994/03/20 17:13:22 gray Exp $
-------------------------------------------------------------------------------

INSTALLATION:

1) Run 'sh ./configure' to configure the library.  You may want to first
	examine the 'config.help' file for some information about
	configure.  Configure should generate the Makefile as well as
	at least one .h file and should configure any subdirectories
	(if necessary).

	NOTE: It seems that some versions of tr (especially from
	HP-UX) don't understand "tr '[a-z]' '[A-Z]'".  Since configure
	uses tr often, you may need to either get gnu's tr or generate
	the conf.h and Makefile by hand.

2) You may want to examine the files created by configure to make sure
	it did its job correctly.

3) Examine the manual settings section of conf.h to tune some specific
	features of the library.

4) Typing 'make' should be enough to build libmalloc.a and
	malloc_dbg program.

	NOTE: non-ansi folks see the GENERAL section of the README
	file for more information.

	WARNING: I was unable to auto-configure to my satisfaction the
	MALLOC_SIZE variable in malloc_dbg.2.  You may have to hand
	edit this file and remake to get things to stop complaining
	about the size arguments to malloc routines

5) Typing 'make tests' should build the malloc_t test program.

6) Typing 'make light' should run the malloc_t test program through
	a set of light trials.  By default this will execute malloc_t
	5 times -- each time will execute 10,000 malloc operations in
	a very random manner.  Very anal folks can 'make heavy' to up
	the ante.  Use 'malloc_t --usage-long' for the list of all
	malloc_t options.

See the 'Quick Start' section below or examine the malloc.info file to
get up and running with the library.

-------------------------------------------------------------------------------

MAKE INSTALL:

Typing 'make install' will install the library and include file into
the lib and include directories that were configured.  You may also
want to install the malloc_lp.o file in the lib directory or the info
file in the info directory.  To do so, uncomment their lines under
install: in the Makefile.  See the malloc.info file for more
information about the usage of the malloc_lp.o object file.

Please note that since earlier 1.2.0 versions, the malloc files have
been renamed to libmalloc_dbg.a and malloc_dbg.h.  The old libmalloc.a
and malloc.h files will have to be removed if you've installed them.

-------------------------------------------------------------------------------

QUICK START:

This section should give you a quick idea on how to get going.  To get
the most of the library however, I'd recommend at least taking a peak
at the info file's Features, Usage, and Programming sections.

Basically, you need to do 6 things to make use of the library:

1)	Follow the installation instructions about to configure and
	make the library.

2)	Install the malloc_dbg program in your favorite bin directory,
	the libmalloc_dbg.a library in the correct lib directory, and
	the malloc_dbg.h include file in the correct include
	directory.

3)	Install the mallocrc file in your home directory as .mallocrc.
	You may want to take a look at the file and add your own
	combination of tokens.

4)	Setup an alias to malloc and put in your shell's rc file.  For
	csh/tcsh users (notice the -C option for c-shell output):

		alias malloc 'eval `malloc_dbg -C \!*`'

	For zsh users (notice the -b option for bourne shell output):

		malloc() { eval `malloc_dbg -b $*` }

5)	Link the library with your program after possibly
	including malloc_dbg.h in your C files and recompiling.

6)	Type: 'malloc -l logfile -i 100 1' (for example).  This will:

	- set the malloc log path to 'logfile' (-l logfile)
	- have the library check itself every 100 iterations (-i 100)
	- enable a certain combination of debug tokens (tag '1').

	malloc_dbg --usage-long might help for more usage info for the
	malloc_dbg program.

7)	Run your program.  And voila!

-------------------------------------------------------------------------------
