From a2f532eb59b72c0f54f57500f813417035a60c40 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Mon, 26 Feb 2007 16:20:53 +0000 Subject: [PATCH] monitoring for dmalloc and bug fix --- Robust/src/Runtime/GenericHashtable.c | 5 +++-- Robust/src/Runtime/SimpleHash.c | 5 ++++- Robust/src/Runtime/checkpoint.c | 3 +++ Robust/src/Runtime/garbage.c | 3 +++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Robust/src/Runtime/GenericHashtable.c b/Robust/src/Runtime/GenericHashtable.c index 24d9d70c..30a1587c 100755 --- a/Robust/src/Runtime/GenericHashtable.c +++ b/Robust/src/Runtime/GenericHashtable.c @@ -7,8 +7,9 @@ #include "GenericHashtable.h" #include "mem.h" -//#include "dmalloc.h" - +#ifdef DMALLOC +#include "dmalloc.h" +#endif int genputtable(struct genhashtable *ht, void * key, void * object) { unsigned int bin=genhashfunction(ht,key); diff --git a/Robust/src/Runtime/SimpleHash.c b/Robust/src/Runtime/SimpleHash.c index 772ff0bb..69055bb7 100755 --- a/Robust/src/Runtime/SimpleHash.c +++ b/Robust/src/Runtime/SimpleHash.c @@ -1,5 +1,8 @@ #include "SimpleHash.h" #include +#ifdef DMALLOC +#include "dmalloc.h" +#endif /* SIMPLE HASH ********************************************************/ struct RuntimeIterator* RuntimeHashcreateiterator(struct RuntimeHash * thisvar) { @@ -34,7 +37,7 @@ void freeRuntimeHash(struct RuntimeHash *thisvar) { struct RuntimeNode *ptr=thisvar->listhead; RUNFREE(thisvar->bucket); while(ptr) { - struct RuntimeNode *next=ptr->next; + struct RuntimeNode *next=ptr->lnext; RUNFREE(ptr); ptr=next; } diff --git a/Robust/src/Runtime/checkpoint.c b/Robust/src/Runtime/checkpoint.c index e20b6e2a..df66337d 100644 --- a/Robust/src/Runtime/checkpoint.c +++ b/Robust/src/Runtime/checkpoint.c @@ -2,6 +2,9 @@ #include "runtime.h" #include "structdefs.h" #include +#ifdef DMALLOC +#include "dmalloc.h" +#endif #define MALLOCSIZE 20*1024 diff --git a/Robust/src/Runtime/garbage.c b/Robust/src/Runtime/garbage.c index b59a3e8b..405cb872 100644 --- a/Robust/src/Runtime/garbage.c +++ b/Robust/src/Runtime/garbage.c @@ -8,6 +8,9 @@ #ifdef THREADS #include "thread.h" #endif +#ifdef DMALLOC +#include "dmalloc.h" +#endif #define NUMPTRS 100 -- 2.34.1