From 616b62fda31cea9b86fbc767a8e8c4f8f01951fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Mon, 31 Jan 2000 13:27:00 -0800
Subject: [PATCH] more debug..

Rev: src/mapping.c:1.55
Rev: src/mapping.h:1.18
---
 src/mapping.c | 5 +++--
 src/mapping.h | 7 +++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/mapping.c b/src/mapping.c
index 1c39fdc2fc..f9f658a337 100644
--- a/src/mapping.c
+++ b/src/mapping.c
@@ -5,7 +5,7 @@
 \*/
 /**/
 #include "global.h"
-RCSID("$Id: mapping.c,v 1.54 2000/01/31 03:24:05 hubbe Exp $");
+RCSID("$Id: mapping.c,v 1.55 2000/01/31 21:26:59 hubbe Exp $");
 #include "main.h"
 #include "object.h"
 #include "mapping.h"
@@ -156,7 +156,7 @@ static void init_mapping(struct mapping *m, INT32 size)
 
 /* This function allocates an empty mapping with room for 'size' values
  */
-struct mapping *allocate_mapping(int size)
+struct mapping *debug_allocate_mapping(int size)
 {
   struct mapping *m;
 
@@ -258,6 +258,7 @@ static struct mapping *rehash(struct mapping *m, int new_size)
 #endif
 
   init_mapping(m, new_size);
+  debug_malloc_touch(m);
 
   for(e=0;e<md->hashsize;e++)
     mapping_rehash_backwards(m->data, md->hash[e]);
diff --git a/src/mapping.h b/src/mapping.h
index c73c98413c..0830ad542d 100644
--- a/src/mapping.h
+++ b/src/mapping.h
@@ -5,7 +5,7 @@
 \*/
 
 /*
- * $Id: mapping.h,v 1.17 2000/01/27 23:18:25 hubbe Exp $
+ * $Id: mapping.h,v 1.18 2000/01/31 21:27:00 hubbe Exp $
  */
 #ifndef MAPPING_H
 #define MAPPING_H
@@ -64,7 +64,7 @@ extern struct mapping *first_mapping;
 #define free_mapping_data(M) do{ struct mapping_data *md_=(M); debug_malloc_touch(md_); if(!--md_->refs) really_free_mapping_data(md_); }while(0)
 
 /* Prototypes begin here */
-struct mapping *allocate_mapping(int size);
+struct mapping *debug_allocate_mapping(int size);
 void really_free_mapping(struct mapping *m);
 void really_free_mapping_data(struct mapping_data *md);
 void mapping_fix_type_field(struct mapping *m);
@@ -133,3 +133,6 @@ void count_memory_in_mappings(INT32 *num_, INT32 *size_);
 struct mapping_data *copy_mapping_data(struct mapping_data *md);
 /* Prototypes end here */
 #endif
+
+#define allocate_mapping(X) dmalloc_touch(struct mapping *,debug_allocate_mapping(X))
+
-- 
GitLab