home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
463.lha
/
mungwall_v36.39
/
mungwall.doc
< prev
next >
Wrap
Text File
|
1990-12-30
|
3KB
|
81 lines
06-Nov-90 Mungwall 36.38 doc.
Mungwall munges memory and watches for illegal FreeMem's
Mungwall is especially useful in combination with Enforcer.
Memory munging:
- Except when Enforcer is running, location 0 is set to $C0DEDBAD, i.e.
programs referencing location zero will not f.e. find a null string.
- On startup all free memory is munged with $ABADCAFE.
- Except when MEMF_CLEAR is set, memory is pre-munged on allocation with
$DEADFOOD.
- Memory is filled with $DEADBEEF before it is freed, encouraging
programs reusing free'ed memory to crash.
Memory watching:
Mungwall places a magic cookie before and after the memory allocation.
Along with, if so desired, a wall of bytes on either side of the
allocation to keep an eye on writting to memory just before or after
the allocation. If the memory wall is trashed, mungwall complains and
shows the damaged area. If memory is trashed so bad that both cookies
are gone, Mungwall will not consider it a walled memory allocation and
lets it go. Changes are you'll be corrupting the memory list and crash
soon after that. If a mungwall hit occurs, memory will not be munged
or free'ed, to give you a change to see what was written there.
Both null pointer and null size FreeMem()'s trigger mungwall.
Mungwall gets upset when a memoryblock is free'ed with a size
different from the one used for allocating the memoryblock, and will
say so.
Unless a specific task(s) is watched and that task leaves before mungwall
does, mungwall will always lose some memory.
MUNGWAL [UPDATE] [[TASK name][WAIT]] [SNOOP] [NOSNOOP] [NOWAIT] [INFO]
[PRESIZE n] [POSTSIZE n] [FILLCHAR 0xXX]
TASK name - Watch only the task(s), or all but the task(s) specified
with 'name'. Multiple tasknames are indicated by placing
a '|' between the names. If the names are preceeded by an
exclamation mark, all tasks except the ones indicated are
tracked. ALL is a reserved name, indicating all tasks
should be tracked. Default ALL.
PRESIZE - Size of wall before memory allocation in bytes. Minimum 8,
maximum 64. Default 32.
POSTSIZE - Size of wall after memory allocation in bytes. Minimum 4,
maximum 64. The actual number of bytes after the allocation
may vary slightly, since it's upped to the nearest longword.
Default 32.
FILLCHAR n - Character to build the memory wall with. Can be indicated
both hexadecimal and decimal. Default 0xBB.
SNOOP - Produce snoop compatible output. No snoop output is given
for illegal FreeMem's. Default OFF. Layers AllocMem's and
FreeMem's are never snooped. SNOOP is particulary useful
in combination with TASK. Snoop output can be filtered
with 'snoopstrip' to find the origin of memory loss.
WAIT - Halt task causing a hit and wait for Ctrl-C. Make sure you
- can issue a break to the task. WAIT can be used without
specifying a specific taskname to watch. Default OFF.
INFO - Show configuration information.
UPDATE - Indicates an already running mungwall task should be up-
dated with new parameters. Presize, postsize and fillchar
can never be updated.
The following are extra updating parameters.
NOSNOOP - Turn snooping off.
NOWAIT - No longer halt a task in case of an error.