projects
/
idzebra-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5478f20
)
Log freelist info changes
author
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 19 Jun 2009 13:25:37 +0000
(15:25 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 19 Jun 2009 13:25:37 +0000
(15:25 +0200)
isamb/isamb.c
patch
|
blob
|
history
diff --git
a/isamb/isamb.c
b/isamb/isamb.c
index
13bb0cf
..
f70a65e
100644
(file)
--- 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;
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
{
}
else
{
@@
-584,8
+588,10
@@
struct ISAMB_block *new_block(ISAMB b, int leaf, int cat)
zebra_exit("isamb:new_block");
}
}
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;
memcpy(&b->file[cat].head.free_list, p->buf, sizeof(zint));
}
p->cat = cat;