Browse Source

memleak: reenable CCAN_TAL_DEBUG in DEVELOPER mode.

It no longer has any effect on tal_len(), but it *does* give file and line
of allocations which is much nicer for tracking memory leaks!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
parent
commit
a409cc26d9
  1. 2
      Makefile
  2. 2
      common/memleak.c

2
Makefile

@ -19,7 +19,7 @@ VG_TEST_ARGS = --track-origins=yes --leak-check=full --show-reachable=yes --erro
endif endif
ifeq ($(DEVELOPER),1) ifeq ($(DEVELOPER),1)
DEV_CFLAGS=-DCCAN_TAKE_DEBUG=1 DEV_CFLAGS=-DCCAN_TAKE_DEBUG=1 -DCCAN_TAL_DEBUG=1
else else
DEV_CFLAGS= DEV_CFLAGS=
endif endif

2
common/memleak.c

@ -91,7 +91,7 @@ static void children_into_htable(const void *exclude1, const void *exclude2,
continue; continue;
/* ccan/io allocates pollfd array. */ /* ccan/io allocates pollfd array. */
if (streq(name, "struct pollfd[]") && !tal_parent(i)) if (strends(name, "struct pollfd[]") && !tal_parent(i))
continue; continue;
/* Don't add tmpctx. */ /* Don't add tmpctx. */

Loading…
Cancel
Save