- Fixed some errors. No more memory leaks.

This commit is contained in:
ccremers 2004-12-09 13:23:26 +00:00
parent c690b0622a
commit c7d9517eac
2 changed files with 11 additions and 0 deletions

View File

@ -22,6 +22,12 @@ int graph_uordblks = 0;
extern Protocol INTRUDER; // The intruder protocol extern Protocol INTRUDER; // The intruder protocol
extern Role I_M; // special role; precedes all other events always extern Role I_M; // special role; precedes all other events always
/*
* Forward declarations
*/
void goal_graph_destroy ();
/* /*
* *
* Assist stuff * Assist stuff

View File

@ -11,6 +11,7 @@ void memDone ();
#define memFree(p,t) free(p) #define memFree(p,t) free(p)
#define memRealloc(p,t) realloc(p,t); #define memRealloc(p,t) realloc(p,t);
#ifdef DEBUG
#define findLoserBegin(ign) int mem_before; \ #define findLoserBegin(ign) int mem_before; \
int mem_diff; \ int mem_diff; \
static int mem_errorcount = 0; \ static int mem_errorcount = 0; \
@ -26,5 +27,9 @@ void memDone ();
if (mem_errorcount >= 1) \ if (mem_errorcount >= 1) \
error ("More than enough leaks."); \ error ("More than enough leaks."); \
} }
#else
#define findLoserBegin(ign) ;
#define findLoserEnd(ign,t) ;
#endif
#endif #endif