From: Adam Dickmeiss Date: Fri, 19 Jun 2009 13:25:37 +0000 (+0200) Subject: Log freelist info changes X-Git-Tag: v2.0.38~3 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=170167b891ba8e3f8284d850f7c4236a39e38887;p=idzebra-moved-to-github.git Log freelist info changes --- diff --git a/isamb/isamb.c b/isamb/isamb.c index 13bb0cf..f70a65e 100644 --- a/isamb/isamb.c +++ b/isamb/isamb.c @@ -569,6 +569,10 @@ struct ISAMB_block *new_block(ISAMB b, int leaf, int cat) zint block_no; block_no = b->file[cat].head.last_block++; p->pos = block_no * CAT_MAX + cat; + if (b->log_freelist) + yaz_log(b->log_freelist, "got block " + ZINT_FORMAT " from last %d:" ZINT_FORMAT, p->pos, + cat, p->pos/CAT_MAX); } else { @@ -584,8 +588,10 @@ struct ISAMB_block *new_block(ISAMB b, int leaf, int cat) zebra_exit("isamb:new_block"); } } - yaz_log(b->log_freelist, "got block " ZINT_FORMAT " from freelist %d:" ZINT_FORMAT, p->pos, - cat, p->pos/CAT_MAX); + if (b->log_freelist) + yaz_log(b->log_freelist, "got block " + ZINT_FORMAT " from freelist %d:" ZINT_FORMAT, p->pos, + cat, p->pos/CAT_MAX); memcpy(&b->file[cat].head.free_list, p->buf, sizeof(zint)); } p->cat = cat;