diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2007-07-13 21:12:25 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2007-07-13 21:12:25 (GMT) |
commit | d44b27ddcc66a8ed55f5069eabbf4c287ce1d99a (patch) | |
tree | ab22bfaa95add178894e6c649dc4b8aea0d196f4 /src/H5Gstab.c | |
parent | 31a2af29ca7aa91fcd47eb018a02ff2e425c5b55 (diff) | |
download | hdf5-d44b27ddcc66a8ed55f5069eabbf4c287ce1d99a.zip hdf5-d44b27ddcc66a8ed55f5069eabbf4c287ce1d99a.tar.gz hdf5-d44b27ddcc66a8ed55f5069eabbf4c287ce1d99a.tar.bz2 |
[svn-r13978] purpose:
New feature.
Description:
Added routines to report on the amount of storage for:
1) 1.6 btree and heap storage info for groups
2) 1.8 btree, fractal heap storage info for groups, attributes and SOHM table
3) btree storage for chunked datasets
4) 1.8 superblock extension size.
Platform tested:
h5committested.
Diffstat (limited to 'src/H5Gstab.c')
-rw-r--r-- | src/H5Gstab.c | 39 |
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() */ |