From: Adam Dickmeiss Date: Fri, 11 Aug 2006 13:10:27 +0000 (+0000) Subject: Fixes for nemm_memory statistics X-Git-Tag: YAZ.2.1.26~4 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=461dbf959bb1d556261c66300d6b0eabb0ae0909;p=yaz-moved-to-github.git Fixes for nemm_memory statistics --- diff --git a/src/nmem.c b/src/nmem.c index 2c7e202..5d3b4db 100644 --- a/src/nmem.c +++ b/src/nmem.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: nmem.c,v 1.24 2006-08-11 12:50:23 adam Exp $ + * $Id: nmem.c,v 1.25 2006-08-11 13:10:27 adam Exp $ */ /** @@ -254,6 +254,7 @@ static struct nmem_block *get_block(size_t size) l->next = r->next; else freelist = r->next; + nmem_memory_free -= r->size; } else { @@ -267,8 +268,8 @@ static struct nmem_block *get_block(size_t size) r = (struct nmem_block *) xmalloc(sizeof(*r)); r->buf = (char *)xmalloc(r->size = get); - nmem_memory_in_use += r->size; } + nmem_memory_in_use += r->size; r->top = 0; return r; }