[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mem Leak Tracer (monitored malloc)



Hi

On Thu, Nov 22, 2001 at 09:47:19PM +0200, Nadav Har'El wrote:
> On Thu, Nov 22, 2001, Yedidyah Bar-David wrote about "Re: Mem Leak Tracer (monitored malloc)":
> > Hi
> > 
[snip]
> 
> I thought the original poster was after a memory *leak* checker.
> According to efence's manual,
> 
>   "Electric  Fence  helps  you  detect two common programming
>    bugs: software that overruns the boundaries of a  malloc()
>    memory  allocation,  and  software  that  touches a memory
>    allocation that has been released by free()."
> 
> These are buffer overflows, not memory leaks. A memory leak is when you
> allocate some memory, and then forget to free it (often you even overwrite
> the pointer and have no way of reaching that piece of memory during the
> lifetime of your process). Programs that have memory leaks usually do not
> show any bugs (hence they are hard to find), but the symptom is that their
> memory usage grows over time, sometimes slightly and sometimes considerably -
> this is very bad for programs which are supposed to run for a very long time,
> or repeat some task over and over many times.
> 
[snip]
> (the signature below is a little relevant here ;) ).
> 
> 
> -- 
> Nadav Har'El                        |     Thursday, Nov 22 2001, 8 Kislev 5762
> nyh@math.technion.ac.il             |-----------------------------------------
> Phone: +972-53-245868, ICQ 13349191 |It is better to be thought a fool, then
> http://nadav.harel.org.il           |to open your mouth and remove all doubt.

Well, I guess I removed all doubt, didn't I? You are of course correct;
efence only causes buffer overruns to segv, nothing more.

Eli - If you only looked at a leak detector - don't look at efence.

	Didi


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il