summaryrefslogtreecommitdiffstats
path: root/src/H5SM.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-04-06 19:53:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-04-06 19:53:37 (GMT)
commit9d9ce9fbd1c8e98225f2fb08db56e8ebc1e9ec56 (patch)
tree272a27a01c186fc139362893df0a5d81602b9e0b /src/H5SM.c
parent0f810834381a67595d8b61383184259e537e996c (diff)
downloadhdf5-9d9ce9fbd1c8e98225f2fb08db56e8ebc1e9ec56.zip
hdf5-9d9ce9fbd1c8e98225f2fb08db56e8ebc1e9ec56.tar.gz
hdf5-9d9ce9fbd1c8e98225f2fb08db56e8ebc1e9ec56.tar.bz2
[svn-r18520] Description:
Bring r18519 from metadata journaling "merging" branch to trunk: Converge metadata_journaling branch and trunk: separate destroy routines for data structures from cache callbacks. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5SM.c')
-rwxr-xr-xsrc/H5SM.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/H5SM.c b/src/H5SM.c
index 9a97d88..b2468d3 100755
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -2291,6 +2291,63 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5SM_table_free
+ *
+ * Purpose: Frees memory used by the SOHM table.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: James Laird
+ * November 6, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5SM_table_free(H5SM_master_table_t *table)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_table_free)
+
+ /* Sanity check */
+ HDassert(table);
+ HDassert(table->indexes);
+
+ H5FL_ARR_FREE(H5SM_index_header_t, table->indexes);
+
+ H5FL_FREE(H5SM_master_table_t, table);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5SM_table_free() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5SM_list_free
+ *
+ * Purpose: Frees all memory used by the list.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: James Laird
+ * November 6, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5SM_list_free(H5SM_list_t *list)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_list_free)
+
+ HDassert(list);
+ HDassert(list->messages);
+
+ H5FL_ARR_FREE(H5SM_sohm_t, list->messages);
+
+ H5FL_FREE(H5SM_list_t, list);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5SM_list_free() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5SM_table_debug
*
* Purpose: Print debugging information for the master table.