NJAMD

Xiaowei Yang yxw at cordelia.lcs.mit.edu
Mon Jul 21 11:36:02 PDT 2003


A few days ago, I posted a message asking whether NJAMD is ported to
FreeBSD. I was told there was no need for porting because the NOTES
file from the source distribution claims NJAMD runs under
FreeBSD. However, I tested NJAMD on FreeBSD machines and found some
problems.

For a simple program C++ I wrote, NJAMD reported memory leak while
there isnot. I did the test both on FreeBSD 4.7 and 5.1, using gcc
versions 2.95, 3.2, 3.3. I will attach the program at the end of the
message. NJAMD on a redhat 8.0 reports the right results.

Can someone recommend me a malloc debugger that works under FreeBsd? I
like NJAMD because I do not need to link the library during
compilation. Is there any similar tool under FreeBsd? I'd appreciate
your feedback!

Attached is my test program, followed by results reported from RedHat
and FreeBSD.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-refcnt.C
Type: application/octet-stream
Size: 2956 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20030721/2fca26e8/test-refcnt.obj
-------------- next part --------------


********************Results reported under  RedHat 8.0********************
refcnt c1 is 1
refcnt c2 is 1
freeing content
auto destructor is called
age d2 is 1
freeing content
auto destructor is called

NJAMD totals:

        Allocation totals:              4 total, 0 leaked
        Leaked User Memory:             0 bytes
        Peak User Memory:               72 bytes
        NJAMD Overhead at peak:         15.930 kB
        Peak NJAMD Overhead:            15.930 kB
        Average NJAMD Overhead:         3.982 kB per alloc
        Address space used:             32.000 kB
        NJAMD Overhead at exit:         0 bytes
*************************************************************************

********************Results reported under FreeBSD********************
[v tmp]$ ./refcnt
refcnt c1 is 1
refcnt c2 is 1
freeing content
auto destructor is called
age d2 is 1
freeing content
auto destructor is called

0x28233000-0x28236000: Aligned len 4096
   Allocation callstack:
        called from 0x8048856
        called from 0x8048585
        called from 0x1
   Not Freed
**********************************************************************


More information about the freebsd-ports mailing list