summaryrefslogtreecommitdiffstats
path: root/src/H5HG.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5HG.c')
-rw-r--r--src/H5HG.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/H5HG.c b/src/H5HG.c
index 27e62f2..94a340a 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -117,6 +117,9 @@ H5HG_create (H5F_t *f, size_t size)
assert (f);
if (size<H5HG_MINSIZE) size = H5HG_MINSIZE;
size = H5HG_ALIGN(size);
+#ifdef QAK
+printf("%s: size=%d\n",FUNC,(int)size);
+#endif /* QAK */
/* Create it */
if (HADDR_UNDEF==(addr=H5MF_alloc(f, H5FD_MEM_GHEAP, (hsize_t)size))) {
@@ -160,6 +163,9 @@ H5HG_create (H5F_t *f, size_t size)
/* The freespace object */
heap->obj[0].size = size - H5HG_SIZEOF_HDR(f);
+#ifdef QAK
+printf("%s: heap->obj[0].size=%d, size=%d\n",FUNC,(int)heap->obj[0].size,(int)size);
+#endif /* QAK */
assert(H5HG_ISALIGNED(heap->obj[0].size));
heap->obj[0].begin = p;
UINT16ENCODE(p, 0); /*object ID*/
@@ -601,7 +607,14 @@ H5HG_insert (H5F_t *f, size_t size, void *obj, H5HG_t *hobj/*out*/)
}
assert (f->shared->ncwfs>0);
assert (f->shared->cwfs[0]==heap);
+#ifdef QAK
+printf("%s: f->shared->cwfs[0]->obj[0].size=%d, size=%d, need=%d, H5HG_SIZEOF_HDR(f)=%d\n",FUNC,(int)f->shared->cwfs[0]->obj[0].size,(int)size,(int)need,(int)H5HG_SIZEOF_HDR(f));
+#endif /* QAK */
+#ifdef OLD_WAY
assert (f->shared->cwfs[0]->obj[0].size >= need+H5HG_SIZEOF_HDR(f));
+#else /* OLD_WAY */
+ assert (f->shared->cwfs[0]->obj[0].size >= need);
+#endif /* OLD_WAY */
cwfsno = 0;
}