summaryrefslogtreecommitdiffstats
path: root/src/H5Gstab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Gstab.c')
-rw-r--r--src/H5Gstab.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 22d90a7..9e9f91b 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -1046,4 +1046,43 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_stab_lookup_by_idx() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_stab_bh_info
+ *
+ * Purpose: Retrieve storage for btree and heap (1.6)
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi
+ * June 25 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5G_stab_bh_info(H5O_loc_t *oloc, H5O_stab_t *stab, hid_t dxpl_id, H5_ih_info_t *bh_info)
+{
+ hsize_t stab_size=0; /* storage used for symbol table nodes */
+ herr_t ret_value = SUCCEED;
+ H5B_info_ud_t bh_udata;
+
+ FUNC_ENTER_NOAPI(H5G_stab_bh_info, FAIL)
+
+ /* Sanity check */
+ HDassert(oloc);
+ HDassert(stab);
+ HDassert(bh_info);
+
+ bh_udata.udata = NULL;
+ bh_udata.btree_size = &(bh_info->index_size);
+
+ if (H5B_iterate_btree_size(oloc->file, dxpl_id, H5B_SNODE, H5G_btree_node_iterate, stab->btree_addr, &bh_udata) <0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "iteration operator failed")
+
+ if (H5HL_heapsize(oloc->file, dxpl_id, stab->heap_addr, &(bh_info->heap_size)) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "iteration operator failed")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G_stab_bh_info() */