Re: GLib RFC: Improve checking provided with --enable-mem-check



On Wed, Jun 06, 2001 at 04:03:10PM +1000, Ben Stanley wrote:
> The addition of this information allows a more meaningful 'check_heap' 
> operation, which may actually walk the heap and check that all the 
> doubly linked list structure is intact, and that the magic numbers 
> guarding the front and back of each block are intact. It would also 
> check that the blocks of memory in the freed block list have not been 
> overwritten. I would like to be able to invoke this operation from the 
> debugger, but I am not yet aware of how to do so.

At least here I might be able to contribute, so I think :)
Functions can be invoked from gdb by calling them in an expression eg. the one passed to the print command.

p check_heap()
Will print the return value of check_heap (lovely) but check_heap will hopefully spew a bunch more stuff to stdout or whatever.





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