|
From: Kaz K. <kky...@gm...> - 2009-11-26 19:43:10
|
Hi All, What is the best way to use the Valgrind (3.5.0) API to inform the tool of the situation that although some objects are reachable only by interior pointers, this is not an accident, and they are not actually leaked? I have such a situation: the program maintains a pointer to some objects, knowing that the true start is at a fixed displacement before that. There is an associated header structure which holds this interior pointer. I do have spare room in the header to add a pointer to the true start of the object (which can be conditionally defined, initialized, and maintained in sync, if Valgrind support is enabled at compile time). Is there another way? Ideally there would be something like ``For this piece of memory, if there are live pointers to any of the bytes 0...N, it is considered reachable''. Cheers ... |