monitoring for dmalloc and bug fix
authorbdemsky <bdemsky>
Mon, 26 Feb 2007 16:20:53 +0000 (16:20 +0000)
committerbdemsky <bdemsky>
Mon, 26 Feb 2007 16:20:53 +0000 (16:20 +0000)
Robust/src/Runtime/GenericHashtable.c
Robust/src/Runtime/SimpleHash.c
Robust/src/Runtime/checkpoint.c
Robust/src/Runtime/garbage.c

index 24d9d70cb3eddc620d027679f5712f2690f3f2fd..30a1587c24ae698304b5c709f98b612cfda89dab 100755 (executable)
@@ -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);
index 772ff0bb40aa9e77af238eac829050d78543d947..69055bb7bfaa63b29d5c2d8460c2f682e3e96f2c 100755 (executable)
@@ -1,5 +1,8 @@
 #include "SimpleHash.h"
 #include <stdio.h>
+#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;
     }
index e20b6e2a7d4766e40325b939e31427cc462dbda4..df66337d84b27190db2bf7fef8adef0b44511186 100644 (file)
@@ -2,6 +2,9 @@
 #include "runtime.h"
 #include "structdefs.h"
 #include <string.h>
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
 
 #define MALLOCSIZE 20*1024
 
index b59a3e8bd3f06551e67b04bfb518bb9fb46d7c94..405cb872f6fc5424f9160809043f3139d7e30d1a 100644 (file)
@@ -8,6 +8,9 @@
 #ifdef THREADS
 #include "thread.h"
 #endif
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
 
 
 #define NUMPTRS 100