diff -ru apr/memory/unix/apr_sms.c apr-sms/memory/unix/apr_sms.c
--- apr/memory/unix/apr_sms.c	Sun Jun 10 20:22:03 2001
+++ apr-sms/memory/unix/apr_sms.c	Tue Jun 12 01:32:40 2001
@@ -103,15 +103,6 @@
     if (size == 0)
         return NULL;
 
-    if (!sms->calloc_fn) {
-        /* Assumption - if we don't have calloc we have
-         * malloc, might be bogus...
-         */
-        void *mem = sms->malloc_fn(sms, size);
-        memset(mem, '\0', size);
-        return mem;
-    }
-    
     return sms->calloc_fn(sms, size);
 
 }
@@ -127,7 +118,11 @@
         return NULL;
     }
 
-    return sms->realloc_fn(sms, mem, size);
+    if (sms->realloc_fn)
+        return sms->realloc_fn(sms, mem, size);
+
+    /* XXX - Should we free the passed in block? */
+    return NULL;
 }
 
 APR_DECLARE(apr_status_t) apr_sms_free(apr_sms_t *sms,
@@ -140,6 +135,21 @@
 }
 
 /*
+ * default allocation functions
+ */
+
+static void *apr_sms_default_calloc(apr_sms_t *sms,
+                                    apr_size_t size)
+{
+    void *mem;
+
+    mem = sms->malloc_fn(sms, size);
+    if (mem)
+        memset(mem, '\0', size);
+    return mem;
+}
+
+/*
  * memory system functions
  */
 
@@ -201,6 +211,11 @@
         apr_lock_release(pms->sms_lock);    
     }
 
+    /* Set the default functions. People implementing smss should not NULLify
+     * any function fields!
+     */
+    sms->calloc_fn  = apr_sms_default_calloc;
+
     /* XXX - This should eventually be removed */
     apr_pool_create(&sms->pool, pms ? pms->pool : NULL);
     
@@ -233,6 +248,12 @@
   
     assert(!sms->reset_fn || sms->destroy_fn);
 
+    /*
+     * Check if someone decided to NULLify the function pointers
+     * we set as default.
+     */
+    assert(sms->calloc_fn);
+    
     /*
      * Make sure all accounting memory dies with the memory system.
      * To be more specific, make sure the accounting memort system
