summaryrefslogtreecommitdiffstats
path: root/src/H5HF.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5HF.c')
-rw-r--r--src/H5HF.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/H5HF.c b/src/H5HF.c
index 58da8a4..733df6c 100644
--- a/src/H5HF.c
+++ b/src/H5HF.c
@@ -354,7 +354,7 @@ HDfprintf(stderr, "%s: size = %Zu\n", FUNC, size);
hdr = fh->hdr;
/* Check if object is large enough to be standalone */
- if(size >= hdr->standalone_size) {
+ if(size > hdr->standalone_size) {
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "standalone blocks not supported yet")
} /* end if */
else {
@@ -582,8 +582,19 @@ H5HF_close(H5HF_t *fh, hid_t dxpl_id)
* a reference loop and the objects couldn't be removed from
* the metadata cache - QAK)
*/
- if(H5HF_man_iter_reset(&fh->hdr->next_block) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
+#ifdef QAK
+HDfprintf(stderr, "%s; fh->hdr->man_iter_off = %Hu\n", FUNC, fh->hdr->man_iter_off);
+HDfprintf(stderr, "%s; fh->hdr->man_size = %Hu\n", FUNC, fh->hdr->man_size);
+HDfprintf(stderr, "%s; fh->hdr->rc = %Zu\n", FUNC, fh->hdr->rc);
+#endif /* QAK */
+ /* Reset block iterator, if necessary */
+ if(H5HF_man_iter_ready(&fh->hdr->next_block)) {
+ if(H5HF_man_iter_reset(&fh->hdr->next_block) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
+ } /* end if */
+#ifdef QAK
+HDfprintf(stderr, "%s; After iterator reset fh->hdr->rc = %Zu\n", FUNC, fh->hdr->rc);
+#endif /* QAK */
/* Decrement the reference count on the heap header */
if(H5HF_hdr_decr(fh->hdr) < 0)