[quagga-users 5695] Re: hello..

john smith johnsmith0302 at hotmail.com
Thu Oct 20 18:44:13 IST 2005


>From: Paul Jakma <paul at clubi.ie>
>To: john smith <johnsmith0302 at hotmail.com>
>CC: aschorr at telemetry-investments.com, quagga-users at lists.quagga.net
>Subject: Re: [quagga-users 5689] Re: hello..
>Date: Thu, 20 Oct 2005 18:42:24 +0100 (IST)
>On Thu, 20 Oct 2005, john smith wrote:
>>any hacks when compliling?
>I have a patch that implements some cheap memory-debug hacks in memory.c, 
>that tries to detect double-frees, writing past end of allocated memory and 
>writing to freed memory. E.g.:
>(gdb) bt
>#4  0x00000038de32b3cc in _zlog_assert_failed (
>     assertion=0x38de338c73 "*((int *)(p + (1 + (((size) - 1) | (sizeof 
>(redzone_marker) - 1))))) == redzone_marker", file=0x38de338c6a "memory.c", 
>     function=0x38de44fdd0 "zredzone_verify") at log.c:536
>That's a bug in ospf6d. (type 'show ip os nei' then 'quit').


>But for simple memory leaks, just look at output of 'show mem <class>', if 
>the leaked memory is allocated via lib/memory.c then it should become 
>obvious in output of that command as a type with disproportionate number of 
>outstanding allocations.
go ask those happy folks who wrote hello world  to simply return the count 
that number of times alloc is called and number of times free is called, and 
let the dev guy account for changes

or is that a very primitve idea?

Express yourself instantly with MSN Messenger! Download today it's FREE! 

More information about the Quagga-users mailing list