diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2017-06-07 17:38:27 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2017-06-07 17:38:27 (GMT) |
commit | 390b5a9febece77f236f4361983c4ef9dbeb394d (patch) | |
tree | 23010f63fe3f038e112fd3a8997d70c9aaf9ba12 /src/H5Dchunk.c | |
parent | 1ccb1b3c1f1dd844944d81f193149b0ebb51e5b8 (diff) | |
download | hdf5-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/H5Dchunk.c')
-rw-r--r-- | src/H5Dchunk.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 59227de..a927736 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -368,6 +368,9 @@ H5FL_BLK_DEFINE_STATIC(chunk); /* Declare extern free list to manage the H5S_sel_iter_t struct */ H5FL_EXTERN(H5S_sel_iter_t); +/* Declare a free list to manage the H5O_layout_t struct */ +H5FL_DEFINE_STATIC(H5O_layout_t); + /*------------------------------------------------------------------------- * Function: H5D__chunk_direct_write @@ -5474,7 +5477,7 @@ H5D__chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_storage_t *storage) if((exists = H5O_msg_exists_oh(oh, H5O_LAYOUT_ID)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to check for object header message") else if(exists) { - 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(f, dxpl_id, oh, H5O_LAYOUT_ID, layout)) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout message") @@ -5504,7 +5507,7 @@ done: HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset layout message") if(layout) - layout = (H5O_layout_t *)H5MM_xfree(layout); + layout = H5FL_FREE(H5O_layout_t, layout); FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__chunk_delete() */ |