summaryrefslogtreecommitdiffstats
path: root/tools/test/perform
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-28 22:48:12 (GMT)
committerGitHub <noreply@github.com>2023-06-28 22:48:12 (GMT)
commitaebac33a1f290fa5065bce96bb0512317a34c283 (patch)
treecdbae6dbd65a2eb4e6f786921ee907cec92c92d3 /tools/test/perform
parent605cea4af60cfcbe03a54f697de392eec75e5a85 (diff)
downloadhdf5-aebac33a1f290fa5065bce96bb0512317a34c283.zip
hdf5-aebac33a1f290fa5065bce96bb0512317a34c283.tar.gz
hdf5-aebac33a1f290fa5065bce96bb0512317a34c283.tar.bz2
Remove HD from memory allocate/free calls (#3195)
* HDcalloc * HDfree * HDmalloc * HDrealloc
Diffstat (limited to 'tools/test/perform')
-rw-r--r--tools/test/perform/chunk_cache.c8
-rw-r--r--tools/test/perform/iopipe.c4
-rw-r--r--tools/test/perform/zip_perf.c14
3 files changed, 13 insertions, 13 deletions
diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c
index 33ea706..3d258ea 100644
--- a/tools/test/perform/chunk_cache.c
+++ b/tools/test/perform/chunk_cache.c
@@ -134,7 +134,7 @@ create_dset1(hid_t file)
H5Dclose(dataset);
H5Pclose(dcpl);
H5Sclose(dataspace);
- HDfree(data);
+ free(data);
return 0;
error:
@@ -145,7 +145,7 @@ error:
H5Sclose(dataspace);
}
H5E_END_TRY
- HDfree(data);
+ free(data);
return 1;
}
@@ -198,7 +198,7 @@ create_dset2(hid_t file)
H5Dclose(dataset);
H5Pclose(dcpl);
H5Sclose(dataspace);
- HDfree(data);
+ free(data);
return 0;
@@ -210,7 +210,7 @@ error:
H5Sclose(dataspace);
}
H5E_END_TRY
- HDfree(data);
+ free(data);
return 1;
}
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index d47420a..8d0daf0 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -159,7 +159,7 @@ main(void)
assert(file_space >= 0);
dset = H5Dcreate2(file, "dset", H5T_NATIVE_UCHAR, file_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(dset >= 0);
- the_data = (unsigned char *)HDmalloc((size_t)(size[0] * size[1]));
+ the_data = (unsigned char *)malloc((size_t)(size[0] * size[1]));
/* initial fill for lazy malloc */
HDmemset(the_data, 0xAA, (size_t)(size[0] * size[1]));
@@ -347,7 +347,7 @@ main(void)
H5Sclose(file_space);
H5Fclose(file);
- HDfree(the_data);
+ free(the_data);
return 0;
}
diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c
index abd1649..c891bf9 100644
--- a/tools/test/perform/zip_perf.c
+++ b/tools/test/perform/zip_perf.c
@@ -104,7 +104,7 @@ cleanup(void)
{
if (!HDgetenv(HDF5_NOCLEANUP))
HDunlink(filename);
- HDfree(filename);
+ free(filename);
}
static void
@@ -117,7 +117,7 @@ write_file(Bytef *source, uLongf sourceLen)
/* destination buffer needs to be at least 0.1% larger than sourceLen
* plus 12 bytes */
destLen = (uLongf)((double)sourceLen + ((double)sourceLen * 0.1)) + 12;
- dest = (Bytef *)HDmalloc(destLen);
+ dest = (Bytef *)malloc(destLen);
if (!dest)
error("out of memory");
@@ -151,7 +151,7 @@ write_file(Bytef *source, uLongf sourceLen)
d_ptr += rc;
}
- HDfree(dest);
+ free(dest);
}
/*
@@ -211,9 +211,9 @@ get_unique_name(void)
if (prefix)
/* 2 = 1 for '/' + 1 for null terminator */
- filename = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(ZIP_PERF_FILE) + 2);
+ filename = (char *)malloc(HDstrlen(prefix) + HDstrlen(ZIP_PERF_FILE) + 2);
else
- filename = (char *)HDmalloc(HDstrlen(ZIP_PERF_FILE) + 1);
+ filename = (char *)malloc(HDstrlen(ZIP_PERF_FILE) + 1);
if (!filename)
error("out of memory");
@@ -364,7 +364,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
unsigned long i, iters;
iters = file_size / src_len;
- src = (Bytef *)HDcalloc(1, sizeof(Bytef) * src_len);
+ src = (Bytef *)calloc(1, sizeof(Bytef) * src_len);
if (!src) {
cleanup();
@@ -452,7 +452,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
fprintf(stdout, "\tCompression Time: %gs\n", compression_time);
HDunlink(filename);
- HDfree(src);
+ free(src);
}
}