Re: [Mesa-dev] [PATCH] i965: Use VALGRIND_MAKE_MEM_x in place of MALLOCLIKE/FREELIKE

2017-07-11 Thread Kenneth Graunke
On Tuesday, July 11, 2017 8:54:25 AM PDT Chris Wilson wrote: > Valgrind doesn't actually implement VALGRIND_FREELIKE_BLOCK as the > exact inverse of VALGRIND_MALLOCLIKE_BLOCK. It makes the block > inaccessible, but still leaves it defined in its allocation tracker i.e. > it will report the mmap as

[Mesa-dev] [PATCH] i965: Use VALGRIND_MAKE_MEM_x in place of MALLOCLIKE/FREELIKE

2017-07-11 Thread Chris Wilson
Valgrind doesn't actually implement VALGRIND_FREELIKE_BLOCK as the exact inverse of VALGRIND_MALLOCLIKE_BLOCK. It makes the block inaccessible, but still leaves it defined in its allocation tracker i.e. it will report the mmap as lost despite the call to FREELIKE! Instead of treating the mmap as