Index: ghash.c
===================================================================
RCS file: /cvs/gnome/glib/ghash.c,v
retrieving revision 1.17
diff -u -p -r1.17 ghash.c
--- ghash.c	1999/02/24 06:13:35	1.17
+++ ghash.c	2001/02/23 00:50:06
@@ -28,6 +28,8 @@
  * MT safe
  */
 
+#define GLIB_PLAIN_MEMORY_SYSTEM
+
 #include "glib.h"
 
 
@@ -67,8 +69,9 @@ static void		g_hash_nodes_destroy	 (GHas
 G_LOCK_DEFINE_STATIC (g_hash_global);
 
 static GMemChunk *node_mem_chunk = NULL;
+#ifndef GLIB_PLAIN_MEMORY_SYSTEM
 static GHashNode *node_free_list = NULL;
-
+#endif
 
 GHashTable*
 g_hash_table_new (GHashFunc    hash_func,
@@ -353,6 +356,9 @@ g_hash_node_new (gpointer key,
 {
   GHashNode *hash_node;
   
+#ifdef GLIB_PLAIN_MEMORY_SYSTEM
+  hash_node = g_new (GHashNode, 1);
+#else
   G_LOCK (g_hash_global);
   if (node_free_list)
     {
@@ -369,6 +375,7 @@ g_hash_node_new (gpointer key,
       hash_node = g_chunk_new (GHashNode, node_mem_chunk);
     }
   G_UNLOCK (g_hash_global);
+#endif
   
   hash_node->key = key;
   hash_node->value = value;
@@ -380,10 +387,14 @@ g_hash_node_new (gpointer key,
 static void
 g_hash_node_destroy (GHashNode *hash_node)
 {
+#ifdef GLIB_PLAIN_MEMORY_SYSTEM
+  g_free (hash_node);
+#else
   G_LOCK (g_hash_global);
-  hash_node->next = node_free_list;
+  hash_node->next = node_free_list; hash_node->key = 0; hash_node->value = 0; 
   node_free_list = hash_node;
   G_UNLOCK (g_hash_global);
+#endif
 }
 
 static void
@@ -392,13 +403,22 @@ g_hash_nodes_destroy (GHashNode *hash_no
   if (hash_node)
     {
       GHashNode *node = hash_node;
-  
+
+#ifdef GLIB_PLAIN_MEMORY_SYSTEM
+      while (node)
+	{
+	  GHashNode *tmp = node;
+	  node = node->next;
+	  g_free (tmp);
+	}
+#else
       while (node->next)
         node = node->next;
-  
+
       G_LOCK (g_hash_global);
       node->next = node_free_list;
       node_free_list = hash_node;
       G_UNLOCK (g_hash_global);
+#endif
     }
 }
Index: glist.c
===================================================================
RCS file: /cvs/gnome/glib/glist.c,v
retrieving revision 1.11
diff -u -p -r1.11 glist.c
--- glist.c	1999/02/24 06:13:42	1.11
+++ glist.c	2001/02/23 00:50:06
@@ -28,6 +28,8 @@
  * MT safe
  */
 
+#define GLIB_PLAIN_MEMORY_SYSTEM
+
 #include "glib.h"
 
 
@@ -105,6 +107,9 @@ g_list_alloc (void)
 {
   GList *list;
 
+#ifdef GLIB_PLAIN_MEMORY_SYSTEM
+  list = g_new (GList, 1);
+#else
   G_LOCK (current_allocator);
   if (!current_allocator)
     {
@@ -134,6 +139,7 @@ g_list_alloc (void)
 	}
     }
   G_UNLOCK (current_allocator);
+#endif
   list->next = NULL;
   list->prev = NULL;
   
@@ -143,6 +149,14 @@ g_list_alloc (void)
 void
 g_list_free (GList *list)
 {
+#ifdef GLIB_PLAIN_MEMORY_SYSTEM
+  while (list)
+    {
+      GList *tmp = list;
+      list = list->next;
+      g_free (tmp);
+    }
+#else
   if (list)
     {
       list->data = list->next;  
@@ -151,6 +165,7 @@ g_list_free (GList *list)
       current_allocator->free_lists = list;
       G_UNLOCK (current_allocator);
     }
+#endif
 }
 
 void
@@ -158,11 +173,15 @@ g_list_free_1 (GList *list)
 {
   if (list)
     {
+#ifdef GLIB_PLAIN_MEMORY_SYSTEM
+      g_free (list);
+#else
       list->data = NULL;  
       G_LOCK (current_allocator);
       list->next = current_allocator->free_lists;
       current_allocator->free_lists = list;
       G_UNLOCK (current_allocator);
+#endif
     }
 }
 
Index: gmem.c
===================================================================
RCS file: /cvs/gnome/glib/gmem.c,v
retrieving revision 1.13.2.7
diff -u -p -r1.13.2.7 gmem.c
--- gmem.c	2000/05/19 08:18:13	1.13.2.7
+++ gmem.c	2001/02/23 00:50:06
@@ -406,10 +406,9 @@ g_free (gpointer mem)
       *t += 1;
       mem = t;
       
-      memset ((guchar*) mem + 2 * SIZEOF_LONG, 0, size);
-#else /* ENABLE_MEM_CHECK */
-      free (mem);
+      memset ((guchar*) mem + 2 * SIZEOF_LONG, 0x2e, size);
 #endif /* ENABLE_MEM_CHECK */
+      free (mem);
     }
 }
 
Index: gslist.c
===================================================================
RCS file: /cvs/gnome/glib/gslist.c,v
retrieving revision 1.10.2.1
diff -u -p -r1.10.2.1 gslist.c
--- gslist.c	2000/05/19 08:18:13	1.10.2.1
+++ gslist.c	2001/02/23 00:50:06
@@ -28,6 +28,8 @@
  * MT safe
  */
 
+#define GLIB_PLAIN_MEMORY_SYSTEM
+
 #include "glib.h"
 
 
@@ -105,6 +107,9 @@ g_slist_alloc (void)
 {
   GSList *list;
 
+#ifdef GLIB_PLAIN_MEMORY_SYSTEM
+  list = g_new (GSList, 1);
+#else
   G_LOCK (current_allocator);
   if (!current_allocator)
     {
@@ -134,6 +139,7 @@ g_slist_alloc (void)
 	}
     }
   G_UNLOCK (current_allocator);
+#endif
   
   list->next = NULL;
 
@@ -143,6 +149,14 @@ g_slist_alloc (void)
 void
 g_slist_free (GSList *list)
 {
+#ifdef GLIB_PLAIN_MEMORY_SYSTEM
+  while (list)
+    {
+      GSList *tmp = list;
+      list = list->next;
+      g_free (tmp);
+    }
+#else
   if (list)
     {
       list->data = list->next;
@@ -151,6 +165,7 @@ g_slist_free (GSList *list)
       current_allocator->free_lists = list;
       G_UNLOCK (current_allocator);
     }
+#endif
 }
 
 void
@@ -158,11 +173,15 @@ g_slist_free_1 (GSList *list)
 {
   if (list)
     {
+#ifdef GLIB_PLAIN_MEMORY_SYSTEM
+      g_free (list);
+#else
       list->data = NULL;
       G_LOCK (current_allocator);
       list->next = current_allocator->free_lists;
       current_allocator->free_lists = list;
       G_UNLOCK (current_allocator);
+#endif
     }
 }
 
Index: gtree.c
===================================================================
RCS file: /cvs/gnome/glib/gtree.c,v
retrieving revision 1.10.2.1
diff -u -p -r1.10.2.1 gtree.c
--- gtree.c	2000/05/19 08:18:13	1.10.2.1
+++ gtree.c	2001/02/23 00:50:06
@@ -135,6 +135,8 @@ g_tree_node_destroy (GTreeNode *node)
     {
       g_tree_node_destroy (node->right);
       g_tree_node_destroy (node->left);
+      node->key = 0;
+      node->value = 0;
       G_LOCK (g_tree_global);
       node->right = node_free_list;
       node_free_list = node;
