X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fzn_malloc.c;h=e5f738e5448f16503e169013b46a019350d1b32a;hb=9767c87531d193a4bef19286b77623aff18590fb;hp=328616d19ba625670b470ac0a54e7679c8a61a2d;hpb=5162c4477b9b53872a236dafbd761bf347afd0ec;p=openldap diff --git a/servers/slapd/zn_malloc.c b/servers/slapd/zn_malloc.c index 328616d19b..e5f738e544 100644 --- a/servers/slapd/zn_malloc.c +++ b/servers/slapd/zn_malloc.c @@ -2,7 +2,7 @@ /* $OpenLDAP$*/ /* This work is part of OpenLDAP Software . * - * Copyright 2003-2004 The OpenLDAP Foundation. + * Copyright 2003-2009 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -13,15 +13,15 @@ * top-level directory of the distribution or, alternatively, at * . */ -/* Copyright 2004 IBM Corporation +/* Portions Copyright 2004 IBM Corporation * All rights reserved. - * Redisribution and use in source and binary forms, with or without - * modification, are permitted only as authorizd by the OpenLADP + * Redistribution and use in source and binary forms, with or without + * modification, are permitted only as authorized by the OpenLDAP * Public License. */ /* ACKNOWLEDGEMENTS - * This work originally developed by Jong-Hyuk Choi - * 2004/12/09 jongchoi@OpenLDAP.org + * This work originally developed by Jong-Hyuk Choi for inclusion in + * OpenLDAP Software. */ #include "portable.h" @@ -29,13 +29,14 @@ #include #include #include -#include #include #include "slap.h" #ifdef SLAP_ZONE_ALLOC +#include + 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;