]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/zn_malloc.c
reject registrations when back-monitor is not configured
[openldap] / servers / slapd / zn_malloc.c
index 328616d19ba625670b470ac0a54e7679c8a61a2d..eb2f035de651b1b99406bf5f592e2a95206cfe55 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$*/
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2003-2004 The OpenLDAP Foundation.
+ * Copyright 2003-2005 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 #include <stdio.h>
 #include <ac/string.h>
 #include <sys/types.h>
-#include <sys/mman.h>
 #include <fcntl.h>
 
 #include "slap.h"
 
 #ifdef SLAP_ZONE_ALLOC
 
+#include <sys/mman.h>
+
 static int slap_zone_cmp(const void *v1, const void *v2);
 void * slap_replenish_zopool(void *ctx);
 
@@ -541,7 +542,7 @@ slap_zn_free(void *ptr, void *ctx)
                                                Debug(LDAP_DEBUG_ANY, "slap_zn_free: "
                                                        "free object not found while bit is clear.\n",
                                                        0, 0, 0);
-                                               assert(zo);
+                                               assert(zo != NULL);
 
                                        }
                                } else {
@@ -603,7 +604,7 @@ slap_zn_free(void *ptr, void *ctx)
                                                Debug(LDAP_DEBUG_ANY, "slap_zn_free: "
                                                        "free object not found while bit is clear.\n",
                                                        0, 0, 0 );
-                                               assert( zo );
+                                               assert(zo != NULL);
 
                                        }
                                } else {
@@ -928,7 +929,7 @@ slap_measure_timing(struct timeval *tv_set, struct timeval *tv_measure)
 int
 slap_zn_latency_history(void* ctx, int ea_latency)
 {
-/* TODO: monitor /proc/swap as well */
+/* TODO: monitor /proc/stat (swap) as well */
        struct zone_heap* zh = ctx;
        double t_diff = 0.0;