[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: bounds checker ?

> Electric Fence is what U are looking for my friend... What's more U can
> find it with some standard distributions (RH at least), no going around

AFAIK, electric fence won't tell you *where* there is a memory leak. It
will definitely show you where you overrun buffers (by making the code seg
fault at that place).

However you can use electric fence to do memory leak *detection*. Because
electric fence allocates 1 read-only page before and after each malloc'ed
chunk, any tiny memory leaks would be very easy to find using plain old

THe problem of finding where exactly are you forgetting to free the leaked
buffer is tough. And I am not aware of anything other than thorough code
walk through to fix this.

Kedar N. Patankar.
Senior Software Engineer.
ishoni Networks
...Broadband for everyone
email - kedar@xxxxxxxxxx
Phone: +91-80-6676108/09 (Work)
Be regular and orderly in your life, so that you may be violent
and original in your work.