summaryrefslogtreecommitdiffstats
path: root/src/H5Doh.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2017-06-07 17:38:27 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2017-06-07 17:38:27 (GMT)
commit390b5a9febece77f236f4361983c4ef9dbeb394d (patch)
tree23010f63fe3f038e112fd3a8997d70c9aaf9ba12 /src/H5Doh.c
parent1ccb1b3c1f1dd844944d81f193149b0ebb51e5b8 (diff)
downloadhdf5-390b5a9febece77f236f4361983c4ef9dbeb394d.zip
hdf5-390b5a9febece77f236f4361983c4ef9dbeb394d.tar.gz
hdf5-390b5a9febece77f236f4361983c4ef9dbeb394d.tar.bz2
Updated H5O_layout_t dynamic work to use the H5FL interface.
Diffstat (limited to 'src/H5Doh.c')
-rw-r--r--src/H5Doh.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5Doh.c b/src/H5Doh.c
index cd70c56..bd83780 100644
--- a/src/H5Doh.c
+++ b/src/H5Doh.c
@@ -27,7 +27,6 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free lists */
#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
#include "H5Opkg.h" /* Object headers */
@@ -88,6 +87,9 @@ const H5O_obj_class_t H5O_OBJ_DATASET[1] = {{
/* Declare a free list to manage the H5D_copy_file_ud_t struct */
H5FL_DEFINE(H5D_copy_file_ud_t);
+/* Declare a free list to manage the H5O_layout_t struct */
+H5FL_DEFINE_STATIC(H5O_layout_t);
+
/*-------------------------------------------------------------------------
* Function: H5O__dset_get_copy_file_udata
@@ -377,7 +379,7 @@ H5O__dset_bh_info(const H5O_loc_t *loc, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *
HDassert(bh_info);
/* Get the layout message from the object header */
- if(NULL == (layout = (H5O_layout_t *)H5MM_calloc(sizeof(H5O_layout_t))))
+ if(NULL == (layout = H5FL_CALLOC(H5O_layout_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't get memory for layout")
if(NULL == H5O_msg_read_oh(loc->file, dxpl_id, oh, H5O_LAYOUT_ID, layout))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find layout message")
@@ -427,7 +429,7 @@ done:
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset external file list message")
if(layout)
- layout = (H5O_layout_t *)H5MM_xfree(layout);
+ layout = H5FL_FREE(H5O_layout_t, layout);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__dset_bh_info() */