sábado, abril 02, 2005

PFC: Programas a comparar

Electric Fence + dmalloc

This two APIs try to extract debugging info redefining malloc(), free(), and similars.

ElectricFence
malloc() debugger
Electric Fence (efence) is an open-source library to detect buffer overruns and under-runs in C programs.

* extensions for finding memory-leaks
http://www.pf-lug.de/projekte/haya/efence.php

Dmalloc
A Debug Malloc Library
http://dmalloc.com/

The debug memory allocation or dmalloc library has been designed as a drop in replacement for the system's malloc, realloc, calloc, free and other memory management routines while providing powerful debugging facilities configurable at runtime. These facilities include such things as memory-leak tracking, fence-post write detection, file/line number reporting, and general logging of statistics.

memprof
MemProf - Profiling and leak detection

http://www.gnome.org/projects/memprof/

MemProf is a tool for profiling memory usage and finding memory leaks. Its two major features are:

* It can generate a profile how much memory was allocated by each function in your program.
* It can scan memory and find blocks that you've allocated but are no longer referenced anywhere.

MemProf works by pre-loading a library to override the C library's memory allocation functions and does not require you to recompile your program.

One advantage MemProf has over some other similar tools that are available is that it has a nice GUI frontend and is relatively easy to use.

lsstack + PStack

Two of them have the same objective.

Dumps a stack trace for a process, given the pid of that
process.

http://www.whatsis.com/pstack/ [Not working]

http://sourceforge.net/projects/lsstack

lsstack is a Linux implementation of the "pstack" utility from Solaris lsstack is a command line utility which (efficiently and quickly) prints the call stacks for all threads in a specified process, with symbolic names for functions, where symbols are.