home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d163
/
memtrace.lha
/
MemTrace
/
Readme
< prev
next >
Wrap
Text File
|
1988-11-22
|
939b
|
24 lines
These routines will help debug memory allocation and freeing
in your programs. These routines will complain if you try and
free memory you didn't allocate and later will complain about
memory not freed when your program finishes. The complaint will
tell the file, function and line # of the offensive memory call.
To use these routines, include mem.h in all of your source
files. Then compile mem.c and link your program with mem.o.
Use AllocMem() and FreeMem() as normal but add the routine call to
freeall() before your program exits in order to get a list of
memory that wasn't free'd up.
I used this under Manx 3.6 with the +L option, but it should
work with 16 bit ints as well.
To turn on the memory trace, define MEMTRACE at compile time
with the -D option, (-DMEMTRACE), and make sure that all the files
get compiled with this option. Do NOT include mem.h in mem.c as
it will break things big time.
Happy hacking,
--j