summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-03-02 10:13:31 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-03-02 10:13:31 (GMT)
commit4173c4b0b9152197562ad227a66137091cba9884 (patch)
treeb0e86efc250ce6eb8dc76ce8a803a349e43d16f7
parentcd3011edad528050f4f822b4b237d2fe1209f829 (diff)
downloadhdf5-4173c4b0b9152197562ad227a66137091cba9884.zip
hdf5-4173c4b0b9152197562ad227a66137091cba9884.tar.gz
hdf5-4173c4b0b9152197562ad227a66137091cba9884.tar.bz2
Switches H5FDvfd_swmr.c memory calls to use H5MM
-rw-r--r--src/H5FDvfd_swmr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5FDvfd_swmr.c b/src/H5FDvfd_swmr.c
index 6f06373..6e29376 100644
--- a/src/H5FDvfd_swmr.c
+++ b/src/H5FDvfd_swmr.c
@@ -276,7 +276,7 @@ H5FD__swmr_reader_open(H5FD_vfd_swmr_t *file)
file->api_elapsed_nbuckets = file->config.max_lag + 1;
file->api_elapsed_ticks =
- calloc(file->api_elapsed_nbuckets, sizeof(*file->api_elapsed_ticks));
+ H5MM_calloc(file->api_elapsed_nbuckets * sizeof(*file->api_elapsed_ticks));
if (file->api_elapsed_ticks == NULL) {
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL,
@@ -437,7 +437,7 @@ swmr_reader_close(H5FD_vfd_swmr_t *file)
"%s: %" PRIu32 " ticks elapsed in API %" PRIu64 " times",
__func__, i, file->api_elapsed_ticks[i]);
}
- free(file->api_elapsed_ticks);
+ H5MM_xfree(file->api_elapsed_ticks);
}
/* Close the metadata file */
@@ -589,7 +589,7 @@ H5FD_vfd_swmr_dedup(H5FD_t *_self, H5FD_t *_other, hid_t fapl)
return NULL;
}
- if ((config = malloc(sizeof(*config))) == NULL) {
+ if ((config = H5MM_malloc(sizeof(*config))) == NULL) {
HERROR(H5E_ARGS, H5E_BADTYPE, "could not allocate config");
return NULL;
}
@@ -600,7 +600,7 @@ H5FD_vfd_swmr_dedup(H5FD_t *_self, H5FD_t *_other, hid_t fapl)
equal_configs = HDmemcmp(&self->config, config, sizeof(*config)) == 0;
- free(config);
+ H5MM_xfree(config);
if (equal_configs)
return _self;