diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-10-13 06:24:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-10-13 06:24:09 (GMT) |
commit | bc010e55565dd53a40cb0187afe34f8506a990e2 (patch) | |
tree | 6c7f151b90c569a4fd6465ee30c58edef3050127 /src/H5HFiblock.c | |
parent | 63f71aca9177fa4642cda8298a7b7c5c1eb5761e (diff) | |
download | hdf5-bc010e55565dd53a40cb0187afe34f8506a990e2.zip hdf5-bc010e55565dd53a40cb0187afe34f8506a990e2.tar.gz hdf5-bc010e55565dd53a40cb0187afe34f8506a990e2.tar.bz2 |
[svn-r15840] Description:
Convert local heap cache client to use metadata journaling cache.
Other minor cleanups & simplifications, etc.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.5.2 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5HFiblock.c')
-rw-r--r-- | src/H5HFiblock.c | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c index 052fd3b..a43dd42 100644 --- a/src/H5HFiblock.c +++ b/src/H5HFiblock.c @@ -1128,7 +1128,7 @@ HDfprintf(stderr, "%s: dir_rows = %u\n", FUNC, dir_rows); done: if(ret_value < 0) if(iblock) - (void)H5HF_cache_iblock_dest(iblock); + (void)H5HF_man_iblock_dest(iblock); FUNC_LEAVE_NOAPI(ret_value) } /* end H5HF_man_iblock_create() */ @@ -1664,3 +1664,56 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5HF_man_iblock_size() */ + +/*------------------------------------------------------------------------- + * Function: H5HF_man_iblock_dest + * + * Purpose: Destroys a fractal heap indirect block in memory. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * koziol@ncsa.uiuc.edu + * Mar 6 2006 + * + *------------------------------------------------------------------------- + */ +herr_t +H5HF_man_iblock_dest(H5HF_indirect_t *iblock) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_dest) + + /* + * Check arguments. + */ + HDassert(iblock); + HDassert(iblock->rc == 0); +#ifdef QAK +HDfprintf(stderr, "%s: Destroying indirect block\n", FUNC); +#endif /* QAK */ + + /* Decrement reference count on shared info */ + HDassert(iblock->hdr); + if(H5HF_hdr_decr(iblock->hdr) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header") + if(iblock->parent) + if(H5HF_iblock_decr(iblock->parent) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block") + + /* Release entry tables */ + if(iblock->ents) + H5FL_SEQ_FREE(H5HF_indirect_ent_t, iblock->ents); + if(iblock->filt_ents) + H5FL_SEQ_FREE(H5HF_indirect_filt_ent_t, iblock->filt_ents); + if(iblock->child_iblocks) + H5FL_SEQ_FREE(H5HF_indirect_ptr_t, iblock->child_iblocks); + + /* Free fractal heap indirect block info */ + H5FL_FREE(H5HF_indirect_t, iblock); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5HF_man_iblock_dest() */ + |