Index: aim.c
===================================================================
--- aim.c	(revision 8258ea514c05b11da3f68d25d8414e222496fa2d)
+++ aim.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -1049,5 +1049,5 @@
   wrapmsg=owl_text_wordwrap(stripmsg, 70);
   nz_screenname=owl_aim_normalize_screenname(userinfo->sn);
-  m=g_new(owl_message, 1);
+  m=g_slice_new(owl_message);
   owl_message_create_aim(m,
 			 nz_screenname,
Index: buddy.c
===================================================================
--- buddy.c	(revision d4927a70549407fe7f56b4ae1d3949663a370205)
+++ buddy.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -72,4 +72,4 @@
 {
   owl_buddy_cleanup(b);
-  g_free(b);
+  g_slice_free(owl_buddy, b);
 }
Index: buddylist.c
===================================================================
--- buddylist.c	(revision 3cdd6d22718b22f0f669d34777233912c1688ed6)
+++ buddylist.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -11,5 +11,5 @@
 {
   owl_buddy *b;
-  b=g_new(owl_buddy, 1);
+  b=g_slice_new(owl_buddy);
   
   owl_buddy_create(b, OWL_PROTOCOL_AIM, screenname);
@@ -50,5 +50,5 @@
 
     /* if not, create the login message */
-    m=g_new(owl_message, 1);
+    m=g_slice_new(owl_message);
     owl_message_create_aim(m,
 			   screenname,
@@ -69,5 +69,5 @@
 
   if (owl_buddylist_is_aim_buddy_loggedin(bl, screenname)) {
-    m=g_new(owl_message, 1);
+    m=g_slice_new(owl_message);
     owl_message_create_aim(m,
 			   screenname,
Index: cmd.c
===================================================================
--- cmd.c	(revision f271129fbb186598811b923e406d65f9d2b3031a)
+++ cmd.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -35,5 +35,5 @@
 void owl_cmddict_add_alias(owl_cmddict *cd, const char *alias_from, const char *alias_to) {
   owl_cmd *cmd;
-  cmd = g_new(owl_cmd, 1);
+  cmd = g_slice_new(owl_cmd);
   owl_cmd_create_alias(cmd, alias_from, alias_to);
   owl_perlconfig_new_command(cmd->name);
@@ -42,7 +42,7 @@
 
 int owl_cmddict_add_cmd(owl_cmddict *cd, const owl_cmd * cmd) {
-  owl_cmd * newcmd = g_new(owl_cmd, 1);
+  owl_cmd * newcmd = g_slice_new(owl_cmd);
   if(owl_cmd_create_from_template(newcmd, cmd) < 0) {
-    g_free(newcmd);
+    g_slice_free(owl_cmd, newcmd);
     return -1;
   }
@@ -141,5 +141,5 @@
 {
   owl_cmd_cleanup(cmd);
-  g_free(cmd);
+  g_slice_free(owl_cmd, cmd);
 }
 
Index: context.c
===================================================================
--- context.c	(revision f271129fbb186598811b923e406d65f9d2b3031a)
+++ context.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -10,5 +10,5 @@
   if (!(mode & OWL_CTX_MODE_BITS))
     mode |= OWL_CTX_INTERACTIVE;
-  c = g_new0(owl_context, 1);
+  c = g_slice_new0(owl_context);
   c->mode = mode;
   c->data = data;
@@ -71,4 +71,4 @@
   if (ctx->delete_cb)
     ctx->delete_cb(ctx);
-  g_free(ctx);
+  g_slice_free(owl_context, ctx);
 }
Index: editwin.c
===================================================================
--- editwin.c	(revision 8258ea514c05b11da3f68d25d8414e222496fa2d)
+++ editwin.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -68,5 +68,5 @@
 static CALLER_OWN owl_editwin *owl_editwin_allocate(void)
 {
-  owl_editwin *e = g_new0(owl_editwin, 1);
+  owl_editwin *e = g_slice_new0(owl_editwin);
   e->refcount = 1;
   return e;
@@ -87,5 +87,5 @@
   oe_destroy_cbdata(e);
 
-  g_free(e);
+  g_slice_free(owl_editwin, e);
 }
 
@@ -373,5 +373,5 @@
 owl_editwin_excursion *owl_editwin_begin_excursion(owl_editwin *e)
 {
-  owl_editwin_excursion *x = g_new(owl_editwin_excursion, 1);
+  owl_editwin_excursion *x = g_slice_new(owl_editwin_excursion);
   oe_save_excursion(e, x);
   return x;
@@ -381,5 +381,5 @@
 {
   oe_restore_excursion(e, x);
-  g_free(x);
+  g_slice_free(owl_editwin_excursion, x);
 }
 
Index: filter.c
===================================================================
--- filter.c	(revision c068c0307a85727dd3ad619122a640f96399d627)
+++ filter.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -18,5 +18,5 @@
   owl_filter *f;
 
-  f = g_new(owl_filter, 1);
+  f = g_slice_new(owl_filter);
 
   f->name=g_strdup(name);
@@ -69,5 +69,5 @@
   if(!argc) return NULL;
 
-  fe = g_new(owl_filterelement, 1);
+  fe = g_slice_new(owl_filterelement);
   owl_filterelement_create(fe);
 
@@ -114,5 +114,5 @@
 err:
   owl_filterelement_cleanup(fe);
-  g_free(fe);
+  g_slice_free(owl_filterelement, fe);
   return NULL;
 }
@@ -132,5 +132,5 @@
     op2 = owl_filter_parse_primitive_expression(argc-i-1, argv+i+1, &skip);
     if(!op2) goto err;
-    tmp = g_new(owl_filterelement, 1);
+    tmp = g_slice_new(owl_filterelement);
     if(!strcasecmp(argv[i], "and")) {
       owl_filterelement_create_and(tmp, op1, op2);
@@ -152,5 +152,5 @@
   if(op1) {
     owl_filterelement_cleanup(op1);
-    g_free(op1);
+    g_slice_free(owl_filterelement, op1);
   }
   return NULL;
@@ -262,8 +262,8 @@
   if (f->root) {
     owl_filterelement_cleanup(f->root);
-    g_free(f->root);
+    g_slice_free(owl_filterelement, f->root);
   }
   if (f->name)
     g_free(f->name);
-  g_free(f);
-}
+  g_slice_free(owl_filter, f);
+}
Index: filterelement.c
===================================================================
--- filterelement.c	(revision 7756dde54c2baa17ccd758175c7bceb60f57b045)
+++ filterelement.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -328,9 +328,9 @@
   if (fe->left) {
     owl_filterelement_cleanup(fe->left);
-    g_free(fe->left);
+    g_slice_free(owl_filterelement, fe->left);
   }
   if (fe->right) {
     owl_filterelement_cleanup(fe->right);
-    g_free(fe->right);
+    g_slice_free(owl_filterelement, fe->right);
   }
   owl_regex_cleanup(&(fe->re));
Index: functions.c
===================================================================
--- functions.c	(revision c55930eba586a550d319a68566c23352ce56ea84)
+++ functions.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -196,5 +196,5 @@
   owl_message *m;
 
-  m=g_new(owl_message, 1);
+  m=g_slice_new(owl_message);
   owl_message_create_admin(m, header, body);
   
@@ -218,5 +218,5 @@
   if (z->cc && owl_zwrite_is_personal(z)) {
     /* create the message */
-    owl_message *m = g_new(owl_message, 1);
+    owl_message *m = g_slice_new(owl_message);
     owl_message_create_from_zwrite(m, z, owl_zwrite_get_message(z), 0);
 
@@ -231,5 +231,5 @@
 
       /* create the message */
-      m = g_new(owl_message, 1);
+      m = g_slice_new(owl_message);
       owl_message_create_from_zwrite(m, z, owl_zwrite_get_message(z), i);
 
@@ -251,5 +251,5 @@
   if (!owl_global_is_aimloggedin(&g)) return(NULL);
   
-  m=g_new(owl_message, 1);
+  m=g_slice_new(owl_message);
   owl_message_create_aim(m,
 			 owl_global_get_aim_screenname(&g),
@@ -270,5 +270,5 @@
 
   /* create the message */
-  m=g_new(owl_message, 1);
+  m=g_slice_new(owl_message);
   owl_message_create_loopback(m, body);
   owl_message_set_direction_out(m);
@@ -516,5 +516,5 @@
   /* create a message and put it on the message queue.  This simulates
    * an incoming message */
-  min=g_new(owl_message, 1);
+  min=g_slice_new(owl_message);
   mout=owl_function_make_outgoing_loopback(msg);
 
@@ -3482,5 +3482,5 @@
   while (zaldptr) {
     ZFreeALD(zaldptr->data);
-    g_free(zaldptr->data);
+    g_slice_free(ZAsyncLocateData_t, zaldptr->data);
     zaldptr = g_list_next(zaldptr);
   }
@@ -3492,9 +3492,9 @@
     for (i = 0; i < anyone->len; i++) {
       user = anyone->pdata[i];
-      zald = g_new(ZAsyncLocateData_t, 1);
+      zald = g_slice_new(ZAsyncLocateData_t);
       if (ZRequestLocations(zstr(user), zald, UNACKED, ZAUTH) == ZERR_NONE) {
         *zaldlist = g_list_append(*zaldlist, zald);
       } else {
-        g_free(zald);
+        g_slice_free(ZAsyncLocateData_t, zald);
       }
     }
Index: global.c
===================================================================
--- global.c	(revision 120dac7db15c30f52572662fbba2fde2b3ecc12a)
+++ global.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -553,9 +553,9 @@
   e->g->filterlist = g_list_remove(e->g->filterlist, e->f);
   owl_filter_delete(e->f);
-  g_free(e);
+  g_slice_free(owl_global_filter_ent, e);
 }
 
 void owl_global_add_filter(owl_global *g, owl_filter *f) {
-  owl_global_filter_ent *e = g_new(owl_global_filter_ent, 1);
+  owl_global_filter_ent *e = g_slice_new(owl_global_filter_ent);
   e->g = g;
   e->f = f;
Index: keybinding.c
===================================================================
--- keybinding.c	(revision f271129fbb186598811b923e406d65f9d2b3031a)
+++ keybinding.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -14,9 +14,9 @@
 CALLER_OWN owl_keybinding *owl_keybinding_new(const char *keyseq, const char *command, void (*function_fn)(void), const char *desc)
 {
-  owl_keybinding *kb = g_new(owl_keybinding, 1);
+  owl_keybinding *kb = g_slice_new(owl_keybinding);
 
   owl_function_debugmsg("owl_keybinding_init: creating binding for <%s> with desc: <%s>", keyseq, desc);
   if (command && function_fn) {
-    g_free(kb);
+    g_slice_free(owl_keybinding, kb);
     return NULL;
   } else if (command && !function_fn) {
@@ -29,5 +29,5 @@
 
   if (owl_keybinding_make_keys(kb, keyseq) != 0) {
-    g_free(kb);
+    g_slice_free(owl_keybinding, kb);
     return NULL;
   }
@@ -70,5 +70,5 @@
   g_free(kb->desc);
   g_free(kb->command);
-  g_free(kb);
+  g_slice_free(owl_keybinding, kb);
 }
 
Index: keymap.c
===================================================================
--- keymap.c	(revision f271129fbb186598811b923e406d65f9d2b3031a)
+++ keymap.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -189,5 +189,5 @@
 {
   owl_keymap *km;
-  km = g_new(owl_keymap, 1);
+  km = g_slice_new(owl_keymap);
   owl_keymap_init(km, name, desc, default_fn, prealways_fn, postalways_fn);
   owl_keyhandler_add_keymap(kh, km);
Index: logging.c
===================================================================
--- logging.c	(revision 0792d99eb4637636b607b9c1579c0b5e97de6a20)
+++ logging.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -177,5 +177,5 @@
     g_free(msg->message);
     g_free(msg->filename);
-    g_free(msg);
+    g_slice_free(owl_log_entry, msg);
   }
 }
@@ -184,5 +184,5 @@
 {
   owl_log_entry *log_msg = NULL; 
-  log_msg = g_new(owl_log_entry,1);
+  log_msg = g_slice_new(owl_log_entry);
   log_msg->message = g_strdup(buffer);
   log_msg->filename = g_strdup(filename);
@@ -266,5 +266,5 @@
    * owl_log_shouldlog_message(void)
    */
-  m = g_new(owl_message, 1);
+  m = g_slice_new(owl_message);
   /* recip_index = 0 because there can only be one recipient anyway */
   owl_message_create_from_zwrite(m, zw, text, 0);
Index: mainwin.c
===================================================================
--- mainwin.c	(revision ab88b053a39621697d2c5b89fcd5dfd9fbf65b04)
+++ mainwin.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -6,5 +6,5 @@
 CALLER_OWN owl_mainwin *owl_mainwin_new(owl_window *window)
 {
-  owl_mainwin *mw = g_new(owl_mainwin, 1);
+  owl_mainwin *mw = g_slice_new(owl_mainwin);
   mw->curtruncated=0;
   mw->lastdisplayed=-1;
Index: message.c
===================================================================
--- message.c	(revision 2354e9a5fabd3efa2825b96557715caa33ede671)
+++ message.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -70,5 +70,5 @@
 
   if(pair ==  NULL) {
-    pair = g_new(owl_pair, 1);
+    pair = g_slice_new(owl_pair);
     owl_pair_create(pair, attrname, NULL);
     g_ptr_array_add(m->attributes, pair);
@@ -1019,5 +1019,5 @@
     p = m->attributes->pdata[i];
     g_free(owl_pair_get_value(p));
-    g_free(p);
+    g_slice_free(owl_pair, p);
   }
 
@@ -1030,4 +1030,4 @@
 {
   owl_message_cleanup(m);
-  g_free(m);
-}
+  g_slice_free(owl_message, m);
+}
Index: messagelist.c
===================================================================
--- messagelist.c	(revision 219f52ca5fddec776365b3e66f4e5415d11a1d40)
+++ messagelist.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -3,5 +3,5 @@
 CALLER_OWN owl_messagelist *owl_messagelist_new(void)
 {
-  owl_messagelist *ml = g_new(owl_messagelist, 1);
+  owl_messagelist *ml = g_slice_new(owl_messagelist);
   ml->list = g_ptr_array_new();
   return ml;
@@ -13,5 +13,5 @@
     g_ptr_array_foreach(ml->list, (GFunc)owl_message_delete, NULL);
   g_ptr_array_free(ml->list, true);
-  g_free(ml);
+  g_slice_free(owl_messagelist, ml);
 }
 
Index: perlconfig.c
===================================================================
--- perlconfig.c	(revision ca1fb26a9a22aea6ecd68b0150859ef065c6afc5)
+++ perlconfig.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -188,5 +188,5 @@
   hash = (HV*)SvRV(msg);
 
-  m = g_new(owl_message, 1);
+  m = g_slice_new(owl_message);
   owl_message_init(m);
 
Index: perlglue.xs
===================================================================
--- perlglue.xs	(revision ae2b830a35eaa511643c7ba6b4d3bdec3b955b18)
+++ perlglue.xs	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -232,5 +232,5 @@
      CODE:
 	{
-		s = g_new(owl_style, 1);
+		s = g_slice_new(owl_style);
 		owl_style_create_perl(s, name, newSVsv(object));
 		owl_global_add_style(&g, s);
Index: popexec.c
===================================================================
--- popexec.c	(revision e146cd7daa6e098d58e1d6cbbf8c74225bcd2da8)
+++ popexec.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -23,5 +23,5 @@
   }
 
-  pe = g_new(owl_popexec, 1);
+  pe = g_slice_new(owl_popexec);
   pe->winactive=0;
   pe->pid=0;
@@ -179,5 +179,5 @@
   if (pe->refcount<=0) {
     owl_function_debugmsg("doing free of %p", pe);
-    g_free(pe);
+    g_slice_free(owl_popexec, pe);
   }
 }
Index: popwin.c
===================================================================
--- popwin.c	(revision 6829afcb7133217c6afdbd7634452d0fabdeaa4f)
+++ popwin.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -3,5 +3,5 @@
 CALLER_OWN owl_popwin *owl_popwin_new(void)
 {
-  owl_popwin *pw = g_new0(owl_popwin, 1);
+  owl_popwin *pw = g_slice_new0(owl_popwin);
 
   pw->border = owl_window_new(NULL);
@@ -92,5 +92,5 @@
   g_object_unref(pw->content);
 
-  g_free(pw);
+  g_slice_free(owl_popwin, pw);
 }
 
Index: runtests.sh
===================================================================
--- runtests.sh	(revision 5db8835abc234293110e218bb062b27abaddf399)
+++ runtests.sh	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -1,2 +1,3 @@
 #!/bin/sh
+export G_SLICE=debug-blocks
 exec env HARNESS_PERL=./tester prove --failures "${srcdir:=$(dirname "$0")}/t/"
Index: select.c
===================================================================
--- select.c	(revision 84a071f695d32531171f37a5ae51c7e8a719122b)
+++ select.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -41,5 +41,5 @@
   if (t->destroy_cbdata)
     t->destroy_cbdata(t->cbdata);
-  g_free(t);
+  g_slice_free(owl_task, t);
 }
 
@@ -47,5 +47,5 @@
 {
   GSource *source = g_idle_source_new();
-  owl_task *t = g_new0(owl_task, 1);
+  owl_task *t = g_slice_new0(owl_task);
   t->cb = cb;
   t->cbdata = cbdata;
Index: style.c
===================================================================
--- style.c	(revision 92ffd89b7ac824d2e42d578ff0a773d6da9853a3)
+++ style.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -103,4 +103,4 @@
 {
   owl_style_cleanup(s);
-  g_free(s);
+  g_slice_free(owl_style, s);
 }
Index: variable.c
===================================================================
--- variable.c	(revision 9d4dfdcd2d49dbcc22eb7c50544376042b61a6ba)
+++ variable.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -627,5 +627,5 @@
 
 static owl_variable *owl_variable_newvar(int type, const char *name, const char *summary, const char *description, const char *validsettings) {
-  owl_variable *var = g_new0(owl_variable, 1);
+  owl_variable *var = g_slice_new0(owl_variable);
   var->type = type;
   var->name = g_strdup(name);
@@ -793,5 +793,5 @@
   g_closure_unref(v->set_fromstring_fn);
 
-  g_free(v);
+  g_slice_free(owl_variable, v);
 }
 
Index: viewwin.c
===================================================================
--- viewwin.c	(revision 78033261fc599d8d986e1c32b68523132b853d40)
+++ viewwin.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -13,5 +13,5 @@
 CALLER_OWN owl_viewwin *owl_viewwin_new_text(owl_window *win, const char *text)
 {
-  owl_viewwin *v = g_new0(owl_viewwin, 1);
+  owl_viewwin *v = g_slice_new0(owl_viewwin);
   owl_fmtext_init_null(&(v->fmtext));
   if (text) {
@@ -36,5 +36,5 @@
 {
   char *text;
-  owl_viewwin *v = g_new0(owl_viewwin, 1);
+  owl_viewwin *v = g_slice_new0(owl_viewwin);
 
   owl_fmtext_copy(&(v->fmtext), fmtext);
@@ -424,4 +424,4 @@
   g_object_unref(v->status);
   owl_fmtext_cleanup(&(v->fmtext));
-  g_free(v);
-}
+  g_slice_free(owl_viewwin, v);
+}
Index: zephyr.c
===================================================================
--- zephyr.c	(revision ebcdf4d1d62cb8a947fa244068de37c0f8ad7dde)
+++ zephyr.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -125,5 +125,5 @@
     owl_zephyr_loadsubs_helper(subs->subs, subs->nsubs);
     deferred_subs = g_list_delete_link(deferred_subs, deferred_subs);
-    g_free(subs);
+    g_slice_free(owl_sub_list, subs);
   }
 
@@ -261,5 +261,5 @@
     g_free(subs);
   } else {
-    owl_sub_list *s = g_new(owl_sub_list, 1);
+    owl_sub_list *s = g_slice_new(owl_sub_list);
     s->subs = subs;
     s->nsubs = count;
@@ -1413,5 +1413,5 @@
           if (ret == ZERR_NONE) {
             /* Send a PSEUDO LOGIN! */
-            m = g_new(owl_message, 1);
+            m = g_slice_new(owl_message);
             owl_message_create_pseudo_zlogin(m, 0, zald->user,
                                              location.host,
@@ -1426,5 +1426,5 @@
         /* Send a PSEUDO LOGOUT! */
         if (notify) {
-          m = g_new(owl_message, 1);
+          m = g_slice_new(owl_message);
           owl_message_create_pseudo_zlogin(m, 1, zald->user, "", "", "");
           owl_global_messagequeue_addmsg(&g, m);
@@ -1435,5 +1435,5 @@
     }
     ZFreeALD(zald);
-    g_free(zald);
+    g_slice_free(ZAsyncLocateData_t, zald);
   }
 }
@@ -1502,5 +1502,5 @@
 
       /* create the new message */
-      m=g_new(owl_message, 1);
+      m=g_slice_new(owl_message);
       owl_message_create_from_znotice(m, &notice);
 
Index: zwrite.c
===================================================================
--- zwrite.c	(revision 919cbf2035c47a7fcb221ef0296e2bfde13eab12)
+++ zwrite.c	(revision 7dcef0312dbb22b5bb46c6e0e72c5508ed26c284)
@@ -3,7 +3,7 @@
 CALLER_OWN owl_zwrite *owl_zwrite_new_from_line(const char *line)
 {
-  owl_zwrite *z = g_new(owl_zwrite, 1);
+  owl_zwrite *z = g_slice_new(owl_zwrite);
   if (owl_zwrite_create_from_line(z, line) != 0) {
-    g_free(z);
+    g_slice_free(owl_zwrite, z);
     return NULL;
   }
@@ -13,7 +13,7 @@
 CALLER_OWN owl_zwrite *owl_zwrite_new(int argc, const char *const *argv)
 {
-  owl_zwrite *z = g_new(owl_zwrite, 1);
+  owl_zwrite *z = g_slice_new(owl_zwrite);
   if (owl_zwrite_create(z, argc, argv) != 0) {
-    g_free(z);
+    g_slice_free(owl_zwrite, z);
     return NULL;
   }
@@ -356,5 +356,5 @@
 {
   owl_zwrite_cleanup(z);
-  g_free(z);
+  g_slice_free(owl_zwrite, z);
 }
 
