summaryrefslogtreecommitdiffstats
path: root/src/H5HFhdr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-10-13 06:24:09 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-10-13 06:24:09 (GMT)
commitbc010e55565dd53a40cb0187afe34f8506a990e2 (patch)
tree6c7f151b90c569a4fd6465ee30c58edef3050127 /src/H5HFhdr.c
parent63f71aca9177fa4642cda8298a7b7c5c1eb5761e (diff)
downloadhdf5-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/H5HFhdr.c')
-rw-r--r--src/H5HFhdr.c42
1 files changed, 40 insertions, 2 deletions
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index c68133c..ecdbca1 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -131,7 +131,7 @@ H5HF_hdr_alloc(H5F_t *f)
done:
if(!ret_value)
if(hdr)
- (void)H5HF_cache_hdr_dest(hdr);
+ (void)H5HF_hdr_dest(hdr);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_alloc() */
@@ -510,7 +510,7 @@ HDfprintf(stderr, "%s: hdr->id_len = %Zu\n", FUNC, hdr->id_len);
done:
if(!H5F_addr_defined(ret_value))
if(hdr)
- (void)H5HF_cache_hdr_dest(hdr);
+ (void)H5HF_hdr_dest(hdr);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_create() */
@@ -1611,3 +1611,41 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_delete() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5HF_hdr_dest
+ *
+ * Purpose: Destroys a fractal heap header in memory.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Feb 24 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5HF_hdr_dest(H5HF_hdr_t *hdr)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_hdr_dest)
+
+ /*
+ * Check arguments.
+ */
+ HDassert(hdr);
+ HDassert(hdr->rc == 0);
+
+ /* Free the block size lookup table for the doubling table */
+ H5HF_dtable_dest(&hdr->man_dtable);
+
+ /* Release any I/O pipeline filter information */
+ if(hdr->pline.nused)
+ H5O_msg_reset(H5O_PLINE_ID, &(hdr->pline));
+
+ /* Free the shared info itself */
+ H5FL_FREE(H5HF_hdr_t, hdr);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5HF_hdr_dest() */
+