Skip to content
Permalink
Browse files

added leak detective reporter

  • Loading branch information...
mcr authored and shussain committed Mar 1, 2019
1 parent e8739d9 commit 88b48dee148b6a03f7f9abe58ca429216d1ff1fb
Showing with 13 additions and 0 deletions.
  1. +1 −0 Makefile.inc
  2. +3 −0 programs/pluto/Makefile
  3. +4 −0 programs/pluto/Makefile.options
  4. +5 −0 programs/pluto/log.c
@@ -442,6 +442,7 @@ USE_TAPROOM?=false
# Whether to use LEAK_DETECTIVE to find memory leaks.
# disabled for now as it causes some pfree()s due to bad code
USE_LEAK_DETECTIVE?=false
USE_ONGOING_LEAK_DETECTIVE?=false

# Use dmalloc. Requires USE_LEAK_DETECTIVE
USE_DMALLOC?=false
@@ -243,6 +243,9 @@ mostlyclean: clean

realclean: clean

options:
echo ${USERCOMPILE} ${PORTINCLUDE} ${COPTS} ${ALLFLAGS}

check:
echo no checks in lib right now.

@@ -253,6 +253,10 @@ endif

ifeq ($(USE_LEAK_DETECTIVE),true)
LEAK_CONF=-DLEAK_DETECTIVE

ifeq ($(USE_ONGOING_LEAK_DETECTIVE),true)
LEAK_CONF+=-DONGOING_LEAK_DETECTIVE
endif
endif

ifeq ($(USE_TAPROOM),true)
@@ -855,6 +855,11 @@ show_status(void)
whack_log(RC_COMMENT, BLANK_FORMAT); /* spacer */
show_shunt_status();
#endif

#if defined(ONGOING_LEAK_DETECTIVE) && defined(LEAK_DETECTIVE)
report_leaks();
#endif

}

/*

0 comments on commit 88b48de

Please sign in to comment.
You can’t perform that action at this time.