This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A couple of uses of xmalloc and xfree in a couple of .y files


> 2008-10-25  Pedro Alves  <pedro@codesourcery.com>
> 
> 	* Makefile.in (.y.c, .l.c): sed free to xfree.

I think it would be useful. The nice thing about using xmalloc/xfree etc
is that it could be turned into a poor man's memory tracking device.
I worked on a double-deallocation problem on Windows once, and all the
tools I tried out there simply were not able to handle the size of my
project. With xfree/xmalloc etc, I could augment their implementation
to log every memory allocation/deallocation from GDB. It won't be
perfect, but it might help narrow down where to look.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]