Prototype memory checking tool

Prototype memory checking tool

Post by Steve Rei » Wed, 03 Mar 1993 08:41:45

We have a prototype implementation of a tool to do memory checking.  It
works by keeping track of the typestate of each byte of memory in the
heap and the stack.  The typestate can be one of Undefined, Uninitialized,
Free or Set.  The program can detect invalid transitions (i.e. attempting
to set or use undefined or free storage or attempting to access
uninitialized storage).  In addition, the program keeps track of heap
management through malloc and free and at the end of the run will report
all memory blocks that were not freed and that are not accessible (i.e.
memory leaks).

The tools works using a spliced-in shared library.  This has the advantage
that no special compilation or linking needs to be done to the application.
It has the disadvantage that it requires the application to be compiled
with shared libraries (at least libc) and to use the standard version of
malloc and free.  It has been tested with C and C++ programs, but should
also work with Pascal, etc.

The tool is available for ftp in source form only from
as pub/aard.tar.Z

It requires C++ 3.0.1 and SunOS 4.X to build.  (We use AT&T C++, it might
need some minor manipulations to use with other C++ compilers; it will not
work completely with the Solaris compilers (even on 4.X) -- eventually this
will be fixed.) Installation may be non-trivial so be warned.


1. Need tool to check for/enforce existence of ANSI prototypes

He didn't say he wanted to *add* prototypes... only check for them.

For that, the -Wstrict-prototypes option is probably the right thing.


-- Ronald F. Guilmette ------------------------------------------------------

------ uucp address: ...!uunet!!rfg -------------------------------

2. module trouble...

3. Memory checking/leak tools for AIX

4. XDM makes CTRL-C disapear

5. C memory checking tool?

6. remote execution of commands (rexecd)

7. Prototype checking of function calls

8. Modem Speed

9. Tool for generating prototypes automatically

10. GUI prototyping tool needed

11. How to check the amount of free memory in share memory

12. Intel Prototype Machine Delivers Strange Memory Info

13. How to find out the memory size used by a process or check its memory leaking?