diff -ru apr/include/apr_sms.h apr-abort/include/apr_sms.h
--- apr/include/apr_sms.h	Sun May 20 05:21:56 2001
+++ apr-abort/include/apr_sms.h	Sun May 20 15:32:20 2001
@@ -106,6 +106,8 @@
   apr_status_t (*destroy_fn)(apr_sms_t *mem_sys);
   apr_status_t (*lock_fn)   (apr_sms_t *mem_sys);
   apr_status_t (*unlock_fn) (apr_sms_t *mem_sys);
+
+  apr_status_t (*abort_fn)  (char *sourcefile, int lineno);
 };
 
 /*
diff -ru apr/memory/unix/apr_sms.c apr-abort/memory/unix/apr_sms.c
--- apr/memory/unix/apr_sms.c	Sun May 20 15:47:14 2001
+++ apr-abort/memory/unix/apr_sms.c	Sun May 20 15:43:36 2001
@@ -88,6 +88,8 @@
 APR_DECLARE(void *) apr_sms_malloc(apr_sms_t *mem_sys,
                                    apr_size_t size)
 {
+    void *mem;
+    
 #ifdef APR_ASSERT_MEMORY
     assert(mem_sys);
     assert(mem_sys->malloc_fn);
@@ -99,12 +101,19 @@
     if (size == 0)
         return NULL;
 
-    return mem_sys->malloc_fn(mem_sys, size);
+    mem = mem_sys->malloc_fn(mem_sys, size);
+    
+    if (!mem && mem_sys->abort_fn)
+        mem_sys->abort_fn(__FILE__, __LINE__);
+
+    return mem;
 }
 
 APR_DECLARE(void *) apr_sms_calloc(apr_sms_t *mem_sys,
                                    apr_size_t size)
 {
+    void *mem;
+    
 #ifdef APR_ASSERT_MEMORY
     assert(mem_sys);
     assert(mem_sys->malloc_fn);
@@ -117,11 +126,18 @@
         /* Assumption - if we don't have calloc we have
          * malloc, might be bogus...
          */
-        void *mem = mem_sys->malloc_fn(mem_sys, size);
-        memset(mem, '\0', size);
-        return mem;
+        mem = mem_sys->malloc_fn(mem_sys, size);
+        if (mem) {
+            memset(mem, '\0', size);
+            return mem;
+        }
     } else
-        return mem_sys->calloc_fn(mem_sys, size);
+        mem = mem_sys->calloc_fn(mem_sys, size);
+
+    if (!mem && mem_sys->abort_fn)
+        mem_sys->abort_fn(__FILE__, __LINE__);
+
+    return mem;
 }
 
 APR_DECLARE(void *) apr_sms_realloc(apr_sms_t *mem_sys, void *mem,
@@ -141,7 +157,12 @@
         return NULL;
     }
 
-    return mem_sys->realloc_fn(mem_sys, mem, size);
+    mem = mem_sys->realloc_fn(mem_sys, mem, size);
+
+    if (!mem && mem_sys->abort_fn)
+        mem_sys->abort_fn(__FILE__, __LINE__);
+
+    return mem;
 }
 
 APR_DECLARE(apr_status_t) apr_sms_free(apr_sms_t *mem_sys,
@@ -206,6 +227,8 @@
         mem_sys->sibling_mem_sys = NULL;
         mem_sys->child_mem_sys   = NULL;
     }
+
+    mem_sys->abort_fn = NULL;
 
     return mem_sys;
 }
