diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2009-11-25 14:17:39 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2009-11-25 14:17:39 -0800 |
commit | 52ae14f4f4f788947c3b5ec3b7b2892b50499690 (patch) | |
tree | a6c60cf34656caf2204c36b64a4573e1579bdabb /lib.h | |
parent | f95e76d93a4dbf27e15ca01f4e8b0ab7d3132a81 (diff) | |
download | txr-52ae14f4f4f788947c3b5ec3b7b2892b50499690.tar.gz txr-52ae14f4f4f788947c3b5ec3b7b2892b50499690.tar.bz2 txr-52ae14f4f4f788947c3b5ec3b7b2892b50499690.zip |
More valgrind integration. Vector objects keep displaced pointers
to vector data; they point to element 0 which is actually the third
element of the vector. If an object is only referenced by interior
pointers, Valgrind reports it as possibly leaked. This change
conditionally adds a pointer to the true start of the vector,
if Valgrind support is enabled.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -108,6 +108,9 @@ struct vec { /* vec[-2] is allocated size */ /* vec[-1] is fill pointer */ val *vec; +#ifdef HAVE_VALGRIND + val *vec_true_start; +#endif }; /* |