I'm familiar with Electric Fence. It works by allocating a non-writable page after every allocation. If the program writes past the end of an array far enough it will attempt to write to the non-writable page and cause a fault. The problem with this is that non-writable pages need to be aligned on page boundaries (1024k?) so it is quite possible to write past the end of an array but not onto the non-writable page. Additionally, it does not detect other types of bugs, e.g. freeing things twice, accessing freed memory, memory leaks, etc. Mike ---- > -----Original Message----- > From: jpschewe at mtu.net [mailto:jpschewe at mtu.net] > Sent: Thursday, September 13, 2001 8:52 PM > To: Mike Bresnahan > Cc: Tclug-Devel at Mn-Linux.Org > Subject: Re: [TCLUG-DEVEL] Equivalent of Purify for GCC/Linux? > > > There's a tool called Electric Fence, look it up on Freshmeat. > Basically it's > a library that you link with, no changes to the code, that tracks all your > malloc and free calls. You then run your program inside gdb and Electric > Fence causes your code to cause a fault that you can trap with > gdb and find > the line. It's not as nice or as fully featured as Purity, but > it does work > nciely and it's free. > >