[Mesa-dev] [PATCH] util: add more memory debugging features

Brian Paul brianp at vmware.com
Wed Nov 28 13:00:23 PST 2012


On 11/28/2012 01:56 PM, Kenneth Graunke wrote:
> On 11/28/2012 12:39 PM, Brian Paul wrote:
>> Add a DEBUG_FREED_MEMORY option to help catch use-after-free errors.
>> Add debug_memory_check() function which can be periodically called to
>> check that all known blocks are good.
>> ---
>> src/gallium/auxiliary/os/os_memory_debug.h | 3 +
>> src/gallium/auxiliary/util/u_debug_memory.c | 82
>> ++++++++++++++++++++++++++-
>> 2 files changed, 84 insertions(+), 1 deletions(-)
>
> Perhaps a stupid question, but isn't this exactly what valgrind is
> designed for? (It works exceeding well at...you can even use
> --db-attach=yes to set a breakpoint at the exact location where you
> read/write the invalid memory...)

Unfortunately, we don't have valgrind on Windows (AFAIK).

-Brian


More information about the mesa-dev mailing list