summaryrefslogtreecommitdiffstats
path: root/test/API
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 /test/API
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 'test/API')
-rw-r--r--test/API/H5_api_attribute_test.c54
-rw-r--r--test/API/H5_api_dataset_test.c190
-rw-r--r--test/API/H5_api_file_test.c66
-rw-r--r--test/API/H5_api_link_test.c24
-rw-r--r--test/API/H5_api_test.c2
-rw-r--r--test/API/H5_api_test_util.c14
-rw-r--r--test/API/tarray.c18
-rw-r--r--test/API/tattr.c48
-rw-r--r--test/API/tchecksum.c6
-rw-r--r--test/API/tcoords.c36
-rw-r--r--test/API/testhdf5.c8
-rw-r--r--test/API/tfile.c26
-rw-r--r--test/API/tgenprop.c36
-rw-r--r--test/API/th5o.c12
-rw-r--r--test/API/th5s.c70
-rw-r--r--test/API/tid.c54
-rw-r--r--test/API/titerate.c14
-rw-r--r--test/API/tmisc.c90
-rw-r--r--test/API/trefer.c162
-rw-r--r--test/API/tselect.c408
-rw-r--r--test/API/tvlstr.c14
-rw-r--r--test/API/tvltypes.c58
22 files changed, 705 insertions, 705 deletions
diff --git a/test/API/H5_api_attribute_test.c b/test/API/H5_api_attribute_test.c
index 84ddbb0..45f4704 100644
--- a/test/API/H5_api_attribute_test.c
+++ b/test/API/H5_api_attribute_test.c
@@ -2369,7 +2369,7 @@ test_write_attribute(void)
data_size *= dims[i];
data_size *= ATTRIBUTE_WRITE_TEST_ATTR_DTYPE_SIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / ATTRIBUTE_WRITE_TEST_ATTR_DTYPE_SIZE; i++)
@@ -2389,7 +2389,7 @@ test_write_attribute(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -2412,7 +2412,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Gclose(group_id);
@@ -2503,7 +2503,7 @@ test_write_attribute_invalid_params(void)
data_size *= dims[i];
data_size *= ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_DTYPE_SIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_DTYPE_SIZE; i++)
@@ -2578,7 +2578,7 @@ test_write_attribute_invalid_params(void)
TESTING_2("test cleanup");
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -2601,7 +2601,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Gclose(group_id);
@@ -2689,9 +2689,9 @@ test_read_attribute(void)
data_size *= dims[i];
data_size *= ATTRIBUTE_READ_TEST_ATTR_DTYPE_SIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
- if (NULL == (read_buf = HDcalloc(1, data_size)))
+ if (NULL == (read_buf = calloc(1, data_size)))
TEST_ERROR;
for (i = 0; i < data_size / ATTRIBUTE_READ_TEST_ATTR_DTYPE_SIZE; i++)
@@ -2704,7 +2704,7 @@ test_read_attribute(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -2732,7 +2732,7 @@ test_read_attribute(void)
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -2755,9 +2755,9 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Gclose(group_id);
@@ -2849,9 +2849,9 @@ test_read_attribute_invalid_params(void)
data_size *= dims[i];
data_size *= ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_DTYPE_SIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
- if (NULL == (read_buf = HDcalloc(1, data_size)))
+ if (NULL == (read_buf = calloc(1, data_size)))
TEST_ERROR;
for (i = 0; i < data_size / ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_DTYPE_SIZE; i++)
@@ -2864,7 +2864,7 @@ test_read_attribute_invalid_params(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -2946,7 +2946,7 @@ test_read_attribute_invalid_params(void)
TESTING_2("test cleanup");
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -2969,9 +2969,9 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Gclose(group_id);
@@ -3065,7 +3065,7 @@ test_read_empty_attribute(void)
data_size *= dims[i];
data_size *= ATTRIBUTE_READ_EMPTY_DTYPE_SIZE;
- if (NULL == (read_buf = HDcalloc(1, data_size)))
+ if (NULL == (read_buf = calloc(1, data_size)))
TEST_ERROR;
if (H5Aread(attr_id, ATTRIBUTE_READ_EMPTY_DTYPE, read_buf) < 0) {
@@ -3075,7 +3075,7 @@ test_read_empty_attribute(void)
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -3098,7 +3098,7 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(space_id);
H5Aclose(attr_id);
H5Gclose(group_id);
@@ -4055,7 +4055,7 @@ test_get_attribute_name(void)
/* Allocate the name buffer */
name_buf_size = strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 2;
- if (NULL == (name_buf = (char *)HDmalloc((size_t)name_buf_size))) {
+ if (NULL == (name_buf = (char *)malloc((size_t)name_buf_size))) {
H5_FAILED();
printf(" couldn't allocate buffer for storing attribute's name\n");
goto error;
@@ -4372,7 +4372,7 @@ test_get_attribute_name(void)
TESTING_2("test cleanup");
if (name_buf) {
- HDfree(name_buf);
+ free(name_buf);
name_buf = NULL;
}
@@ -4397,7 +4397,7 @@ error:
H5E_BEGIN_TRY
{
if (name_buf)
- HDfree(name_buf);
+ free(name_buf);
H5Sclose(space_id);
H5Tclose(attr_dtype);
H5Aclose(attr_id);
@@ -4499,7 +4499,7 @@ test_get_attribute_name_invalid_params(void)
goto error;
}
- if (NULL == (name_buf = (char *)HDmalloc((size_t)name_buf_size + 1)))
+ if (NULL == (name_buf = (char *)malloc((size_t)name_buf_size + 1)))
TEST_ERROR;
PASSED();
@@ -4731,7 +4731,7 @@ test_get_attribute_name_invalid_params(void)
TESTING_2("test cleanup");
if (name_buf) {
- HDfree(name_buf);
+ free(name_buf);
name_buf = NULL;
}
@@ -4756,7 +4756,7 @@ error:
H5E_BEGIN_TRY
{
if (name_buf)
- HDfree(name_buf);
+ free(name_buf);
H5Sclose(space_id);
H5Tclose(attr_dtype);
H5Aclose(attr_id);
diff --git a/test/API/H5_api_dataset_test.c b/test/API/H5_api_dataset_test.c
index e3843a6..55c4497 100644
--- a/test/API/H5_api_dataset_test.c
+++ b/test/API/H5_api_dataset_test.c
@@ -3753,7 +3753,7 @@ test_dataset_property_lists(void)
PART_ERROR(H5Dget_access_plist);
}
- if (NULL == (tmp_prefix = (char *)HDcalloc(1, (size_t)buf_size + 1))) {
+ if (NULL == (tmp_prefix = (char *)calloc(1, (size_t)buf_size + 1))) {
H5_FAILED();
printf(" couldn't allocate buffer for property value\n");
PART_ERROR(H5Dget_access_plist);
@@ -3897,7 +3897,7 @@ test_dataset_property_lists(void)
TESTING_2("test cleanup");
if (tmp_prefix) {
- HDfree(tmp_prefix);
+ free(tmp_prefix);
tmp_prefix = NULL;
}
@@ -3942,7 +3942,7 @@ error:
H5E_BEGIN_TRY
{
if (tmp_prefix)
- HDfree(tmp_prefix);
+ free(tmp_prefix);
H5Pclose(dcpl_id1);
H5Pclose(dcpl_id2);
H5Pclose(dapl_id1);
@@ -4108,7 +4108,7 @@ test_read_dataset_small_all(void)
data_size *= dims[i];
data_size *= DATASET_SMALL_READ_TEST_ALL_DSET_DTYPESIZE;
- if (NULL == (read_buf = HDmalloc(data_size)))
+ if (NULL == (read_buf = malloc(data_size)))
TEST_ERROR;
if (H5Dread(dset_id, DATASET_SMALL_READ_TEST_ALL_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) <
@@ -4119,7 +4119,7 @@ test_read_dataset_small_all(void)
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -4142,7 +4142,7 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(fspace_id);
H5Dclose(dset_id);
H5Gclose(group_id);
@@ -4232,7 +4232,7 @@ test_read_dataset_small_hyperslab(void)
data_size *= dims[i];
data_size *= DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_DTYPESIZE;
- if (NULL == (read_buf = HDmalloc(data_size)))
+ if (NULL == (read_buf = malloc(data_size)))
TEST_ERROR;
if (H5Dread(dset_id, DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT,
@@ -4243,7 +4243,7 @@ test_read_dataset_small_hyperslab(void)
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -4268,7 +4268,7 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -4347,7 +4347,7 @@ test_read_dataset_small_point_selection(void)
data_size = DATASET_SMALL_READ_TEST_POINT_SELECTION_NUM_POINTS *
DATASET_SMALL_READ_TEST_POINT_SELECTION_DSET_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < DATASET_SMALL_READ_TEST_POINT_SELECTION_NUM_POINTS; i++) {
@@ -4372,7 +4372,7 @@ test_read_dataset_small_point_selection(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -4397,7 +4397,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -4969,7 +4969,7 @@ test_read_dataset_invalid_params(void)
data_size *= dims[i];
data_size *= DATASET_READ_INVALID_PARAMS_TEST_DSET_DTYPESIZE;
- if (NULL == (read_buf = HDmalloc(data_size)))
+ if (NULL == (read_buf = malloc(data_size)))
TEST_ERROR;
PASSED();
@@ -5106,7 +5106,7 @@ test_read_dataset_invalid_params(void)
TESTING_2("test cleanup");
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -5129,7 +5129,7 @@ error:
H5E_BEGIN_TRY
{
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(fspace_id);
H5Dclose(dset_id);
H5Gclose(group_id);
@@ -5221,7 +5221,7 @@ test_write_dataset_small_all(void)
goto error;
}
- if (NULL == (data = HDmalloc((hsize_t)space_npoints * DATASET_SMALL_WRITE_TEST_ALL_DSET_DTYPESIZE)))
+ if (NULL == (data = malloc((hsize_t)space_npoints * DATASET_SMALL_WRITE_TEST_ALL_DSET_DTYPESIZE)))
TEST_ERROR;
for (i = 0; i < (hsize_t)space_npoints; i++)
@@ -5234,7 +5234,7 @@ test_write_dataset_small_all(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -5257,7 +5257,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(fspace_id);
H5Dclose(dset_id);
H5Gclose(group_id);
@@ -5336,7 +5336,7 @@ test_write_dataset_small_hyperslab(void)
data_size *= dims[i];
data_size *= DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_DTYPESIZE; i++)
@@ -5362,7 +5362,7 @@ test_write_dataset_small_hyperslab(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -5387,7 +5387,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -5466,7 +5466,7 @@ test_write_dataset_small_point_selection(void)
data_size = DATASET_SMALL_WRITE_TEST_POINT_SELECTION_NUM_POINTS *
DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_DTYPESIZE; i++)
@@ -5494,7 +5494,7 @@ test_write_dataset_small_point_selection(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -5519,7 +5519,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -5604,7 +5604,7 @@ test_write_dataset_data_verification(void)
data_size *= dims[i];
data_size *= DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE; i++)
@@ -5626,7 +5626,7 @@ test_write_dataset_data_verification(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -5666,7 +5666,7 @@ test_write_dataset_data_verification(void)
}
if (NULL ==
- (data = HDmalloc((hsize_t)space_npoints * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE))) {
+ (data = malloc((hsize_t)space_npoints * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_all_read);
@@ -5687,7 +5687,7 @@ test_write_dataset_data_verification(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -5701,7 +5701,7 @@ test_write_dataset_data_verification(void)
data_size = dims[1] * 2 * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset write\n");
PART_ERROR(H5Dwrite_hyperslab_read);
@@ -5714,7 +5714,7 @@ test_write_dataset_data_verification(void)
data_size *= dims[i];
data_size *= DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size))) {
+ if (NULL == (data = malloc(data_size))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset data verification\n");
PART_ERROR(H5Dwrite_hyperslab_read);
@@ -5808,8 +5808,8 @@ test_write_dataset_data_verification(void)
PART_ERROR(H5Dwrite_hyperslab_read);
}
- if (NULL == (read_buf = HDmalloc((hsize_t)space_npoints *
- DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE))) {
+ if (NULL ==
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_hyperslab_read);
@@ -5829,17 +5829,17 @@ test_write_dataset_data_verification(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -5854,7 +5854,7 @@ test_write_dataset_data_verification(void)
data_size =
DATASET_DATA_VERIFY_WRITE_TEST_NUM_POINTS * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset write\n");
PART_ERROR(H5Dwrite_point_sel_read);
@@ -5867,7 +5867,7 @@ test_write_dataset_data_verification(void)
data_size *= dims[i];
data_size *= DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size))) {
+ if (NULL == (data = malloc(data_size))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset data verification\n");
PART_ERROR(H5Dwrite_point_sel_read);
@@ -5968,8 +5968,8 @@ test_write_dataset_data_verification(void)
PART_ERROR(H5Dwrite_point_sel_read);
}
- if (NULL == (read_buf = HDmalloc((hsize_t)space_npoints *
- DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE))) {
+ if (NULL ==
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_point_sel_read);
@@ -5997,17 +5997,17 @@ test_write_dataset_data_verification(void)
TESTING_2("test cleanup");
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -6030,11 +6030,11 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -6113,7 +6113,7 @@ test_write_dataset_invalid_params(void)
goto error;
}
- if (NULL == (data = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_INVALID_PARAMS_TEST_DSET_DTYPESIZE)))
+ if (NULL == (data = malloc((hsize_t)space_npoints * DATASET_WRITE_INVALID_PARAMS_TEST_DSET_DTYPESIZE)))
TEST_ERROR;
for (i = 0; i < (hsize_t)space_npoints; i++)
@@ -6253,7 +6253,7 @@ test_write_dataset_invalid_params(void)
TESTING_2("test cleanup");
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -6276,7 +6276,7 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
H5Sclose(fspace_id);
H5Dclose(dset_id);
H5Gclose(group_id);
@@ -6372,7 +6372,7 @@ test_dataset_builtin_type_conversion(void)
data_size *= dims[i];
data_size *= DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size)))
+ if (NULL == (data = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE; i++)
@@ -6395,7 +6395,7 @@ test_dataset_builtin_type_conversion(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -6435,8 +6435,8 @@ test_dataset_builtin_type_conversion(void)
PART_ERROR(H5Dwrite_all_read);
}
- if (NULL == (data = HDmalloc((hsize_t)space_npoints *
- DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE))) {
+ if (NULL == (data = malloc((hsize_t)space_npoints *
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_all_read);
@@ -6458,7 +6458,7 @@ test_dataset_builtin_type_conversion(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
@@ -6472,7 +6472,7 @@ test_dataset_builtin_type_conversion(void)
data_size = dims[1] * 2 * DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset write\n");
PART_ERROR(H5Dwrite_hyperslab_read);
@@ -6485,7 +6485,7 @@ test_dataset_builtin_type_conversion(void)
data_size *= dims[i];
data_size *= DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size))) {
+ if (NULL == (data = malloc(data_size))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset data verification\n");
PART_ERROR(H5Dwrite_hyperslab_read);
@@ -6582,8 +6582,8 @@ test_dataset_builtin_type_conversion(void)
PART_ERROR(H5Dwrite_hyperslab_read);
}
- if (NULL == (read_buf = HDmalloc((hsize_t)space_npoints *
- DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE))) {
+ if (NULL == (read_buf = malloc((hsize_t)space_npoints *
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_hyperslab_read);
@@ -6604,17 +6604,17 @@ test_dataset_builtin_type_conversion(void)
}
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -6629,7 +6629,7 @@ test_dataset_builtin_type_conversion(void)
data_size = DATASET_DATA_BUILTIN_CONVERSION_TEST_NUM_POINTS *
DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size))) {
+ if (NULL == (write_buf = malloc(data_size))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset write\n");
PART_ERROR(H5Dwrite_point_sel_read);
@@ -6642,7 +6642,7 @@ test_dataset_builtin_type_conversion(void)
data_size *= dims[i];
data_size *= DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE;
- if (NULL == (data = HDmalloc(data_size))) {
+ if (NULL == (data = malloc(data_size))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset data verification\n");
PART_ERROR(H5Dwrite_point_sel_read);
@@ -6746,8 +6746,8 @@ test_dataset_builtin_type_conversion(void)
PART_ERROR(H5Dwrite_point_sel_read);
}
- if (NULL == (read_buf = HDmalloc((hsize_t)space_npoints *
- DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE))) {
+ if (NULL == (read_buf = malloc((hsize_t)space_npoints *
+ DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset read\n");
PART_ERROR(H5Dwrite_point_sel_read);
@@ -6776,17 +6776,17 @@ test_dataset_builtin_type_conversion(void)
TESTING_2("test cleanup");
if (data) {
- HDfree(data);
+ free(data);
data = NULL;
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -6809,11 +6809,11 @@ error:
H5E_BEGIN_TRY
{
if (data)
- HDfree(data);
+ free(data);
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -8695,7 +8695,7 @@ test_write_single_chunk_dataset(void)
data_size *= dims[i];
data_size *= DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size)))
+ if (NULL == (write_buf = malloc(data_size)))
TEST_ERROR;
for (i = 0; i < data_size / DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPESIZE; i++)
@@ -8709,7 +8709,7 @@ test_write_single_chunk_dataset(void)
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -8749,7 +8749,7 @@ test_write_single_chunk_dataset(void)
}
if (NULL ==
- (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPESIZE))) {
+ (read_buf = malloc((hsize_t)space_npoints * DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPESIZE))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset read\n");
goto error;
@@ -8770,7 +8770,7 @@ test_write_single_chunk_dataset(void)
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -8795,9 +8795,9 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Pclose(dcpl_id);
H5Sclose(fspace_id);
H5Dclose(dset_id);
@@ -9107,7 +9107,7 @@ test_write_multi_chunk_dataset_same_shape_read(void)
data_size *= dims[i];
data_size *= DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size)))
+ if (NULL == (write_buf = malloc(data_size)))
TEST_ERROR;
/*
@@ -9176,7 +9176,7 @@ test_write_multi_chunk_dataset_same_shape_read(void)
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -9301,7 +9301,7 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
H5Pclose(dcpl_id);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
@@ -9433,7 +9433,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
data_size *= dims[i];
data_size *= DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size)))
+ if (NULL == (write_buf = malloc(data_size)))
TEST_ERROR;
/*
@@ -9502,7 +9502,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -9539,7 +9539,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
/*
* Allocate single chunk-sized read buffer.
*/
- if (NULL == (read_buf = HDmalloc(chunk_size))) {
+ if (NULL == (read_buf = malloc(chunk_size))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset read\n");
goto error;
@@ -9609,7 +9609,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void)
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -9636,9 +9636,9 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Pclose(dcpl_id);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
@@ -9771,7 +9771,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
data_size *= dims[i];
data_size *= DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size)))
+ if (NULL == (write_buf = malloc(data_size)))
TEST_ERROR;
/*
@@ -9946,7 +9946,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void)
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
@@ -9973,7 +9973,7 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
H5Pclose(dcpl_id);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
@@ -10106,13 +10106,13 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
data_size *= dims[i];
data_size *= DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_DTYPESIZE;
- if (NULL == (write_buf = HDmalloc(data_size)))
+ if (NULL == (write_buf = malloc(data_size)))
TEST_ERROR;
/*
* Allocate single chunk-sized read buffer.
*/
- if (NULL == (read_buf = HDmalloc(chunk_size))) {
+ if (NULL == (read_buf = malloc(chunk_size))) {
H5_FAILED();
printf(" couldn't allocate buffer for dataset read\n");
goto error;
@@ -10286,12 +10286,12 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void)
}
if (write_buf) {
- HDfree(write_buf);
+ free(write_buf);
write_buf = NULL;
}
if (read_buf) {
- HDfree(read_buf);
+ free(read_buf);
read_buf = NULL;
}
@@ -10318,9 +10318,9 @@ error:
H5E_BEGIN_TRY
{
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
H5Pclose(dcpl_id);
H5Sclose(mspace_id);
H5Sclose(fspace_id);
@@ -10862,7 +10862,7 @@ test_get_vlen_buf_size(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < DATASET_GET_VLEN_BUF_SIZE_DSET_SPACE_DIM; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(unsigned int));
+ wdata[i].p = malloc((i + 1) * sizeof(unsigned int));
wdata[i].len = i + 1;
for (j = 0; j < (i + 1); j++)
((unsigned int *)wdata[i].p)[j] = i * 10 + j;
diff --git a/test/API/H5_api_file_test.c b/test/API/H5_api_file_test.c
index a73e28f..d3d686c 100644
--- a/test/API/H5_api_file_test.c
+++ b/test/API/H5_api_file_test.c
@@ -86,7 +86,7 @@ test_create_file(void)
if (H5Fclose(file_id) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -100,7 +100,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -236,7 +236,7 @@ test_create_file_invalid_params(void)
}
END_MULTIPART;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
return 0;
@@ -251,7 +251,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -317,7 +317,7 @@ test_create_file_excl(void)
if (H5Fclose(file_id) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -332,7 +332,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -560,7 +560,7 @@ test_open_nonexistent_file(void)
goto error;
}
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -574,7 +574,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -791,7 +791,7 @@ test_file_permission(void)
if (H5Fclose(file_id) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -810,7 +810,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -1002,7 +1002,7 @@ test_flush_file(void)
if (H5Fclose(file_id) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -1018,7 +1018,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -1096,13 +1096,13 @@ test_file_is_accessible(void)
}
END_MULTIPART;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
return 0;
error:
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -1386,9 +1386,9 @@ test_file_property_lists(void)
if (H5Fclose(file_id2) < 0)
TEST_ERROR;
- HDfree(prefixed_filename1);
+ free(prefixed_filename1);
prefixed_filename1 = NULL;
- HDfree(prefixed_filename2);
+ free(prefixed_filename2);
prefixed_filename2 = NULL;
PASSED();
@@ -1407,8 +1407,8 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename1);
- HDfree(prefixed_filename2);
+ free(prefixed_filename1);
+ free(prefixed_filename2);
return 1;
}
@@ -1553,7 +1553,7 @@ test_get_file_intent(void)
}
END_MULTIPART;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
return 0;
@@ -1565,7 +1565,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -1887,9 +1887,9 @@ test_get_file_obj_count(void)
if (H5Fclose(file_id2) < 0)
TEST_ERROR;
- HDfree(prefixed_filename1);
+ free(prefixed_filename1);
prefixed_filename1 = NULL;
- HDfree(prefixed_filename2);
+ free(prefixed_filename2);
prefixed_filename2 = NULL;
PASSED();
@@ -1909,8 +1909,8 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename1);
- HDfree(prefixed_filename2);
+ free(prefixed_filename1);
+ free(prefixed_filename2);
return 1;
}
@@ -2030,7 +2030,7 @@ test_file_open_overlap(void)
if (H5Fclose(file_id2) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -2048,7 +2048,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -2121,7 +2121,7 @@ test_file_mounts(void)
if (H5Fclose(child_fid) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -2137,7 +2137,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
@@ -2191,7 +2191,7 @@ test_get_file_name(void)
TEST_ERROR;
/* Allocate buffer for file name */
- if (NULL == (file_name_buf = (char *)HDmalloc((size_t)file_name_buf_len + 1)))
+ if (NULL == (file_name_buf = (char *)malloc((size_t)file_name_buf_len + 1)))
TEST_ERROR;
PASSED();
@@ -2457,14 +2457,14 @@ test_get_file_name(void)
TESTING_2("test cleanup");
if (file_name_buf) {
- HDfree(file_name_buf);
+ free(file_name_buf);
file_name_buf = NULL;
}
if (H5Fclose(file_id) < 0)
TEST_ERROR;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
prefixed_filename = NULL;
PASSED();
@@ -2475,7 +2475,7 @@ error:
H5E_BEGIN_TRY
{
if (file_name_buf)
- HDfree(file_name_buf);
+ free(file_name_buf);
H5Tclose(named_dtype_id);
H5Sclose(dspace_id);
H5Dclose(dset_id);
@@ -2485,7 +2485,7 @@ error:
}
H5E_END_TRY;
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return 1;
}
diff --git a/test/API/H5_api_link_test.c b/test/API/H5_api_link_test.c
index 3559254..ffc5de5 100644
--- a/test/API/H5_api_link_test.c
+++ b/test/API/H5_api_link_test.c
@@ -307,7 +307,7 @@ test_create_hard_link_long_name(void)
name_len = 99;
/* Construct very long file name */
- if ((objname = (char *)HDmalloc((size_t)(name_len + 1))) == NULL)
+ if ((objname = (char *)malloc((size_t)(name_len + 1))) == NULL)
TEST_ERROR;
for (u = 0; u < name_len; u++)
@@ -342,7 +342,7 @@ test_create_hard_link_long_name(void)
/* Release memory */
if (objname)
- HDfree(objname);
+ free(objname);
PASSED();
@@ -358,7 +358,7 @@ error:
H5E_END_TRY;
if (objname)
- HDfree(objname);
+ free(objname);
return 1;
}
@@ -1493,7 +1493,7 @@ test_create_soft_link_long_name(void)
name_len = 99;
/* Construct very long file name */
- if ((objname = (char *)HDmalloc((size_t)(name_len + 1))) == NULL)
+ if ((objname = (char *)malloc((size_t)(name_len + 1))) == NULL)
TEST_ERROR;
for (u = 0; u < name_len; u++)
@@ -1528,7 +1528,7 @@ test_create_soft_link_long_name(void)
/* Release memory */
if (objname)
- HDfree(objname);
+ free(objname);
PASSED();
@@ -1544,7 +1544,7 @@ error:
H5E_END_TRY;
if (objname)
- HDfree(objname);
+ free(objname);
return 1;
}
@@ -13691,7 +13691,7 @@ test_get_link_val_invalid_params(void)
}
link_val_buf_size = 100;
- if (NULL == (link_val_buf = (char *)HDmalloc(link_val_buf_size))) {
+ if (NULL == (link_val_buf = (char *)malloc(link_val_buf_size))) {
H5_FAILED();
printf(" couldn't allocate buffer for storing link value\n");
goto error;
@@ -13928,7 +13928,7 @@ test_get_link_val_invalid_params(void)
TESTING_2("test cleanup");
if (link_val_buf) {
- HDfree(link_val_buf);
+ free(link_val_buf);
link_val_buf = NULL;
}
@@ -13949,7 +13949,7 @@ error:
H5E_BEGIN_TRY
{
if (link_val_buf)
- HDfree(link_val_buf);
+ free(link_val_buf);
H5Pclose(gcpl_id);
H5Gclose(group_id);
H5Gclose(container_group);
@@ -19303,7 +19303,7 @@ test_get_link_name_invalid_params(void)
}
link_name_buf_size = (size_t)ret;
- if (NULL == (link_name_buf = (char *)HDmalloc(link_name_buf_size + 1)))
+ if (NULL == (link_name_buf = (char *)malloc(link_name_buf_size + 1)))
TEST_ERROR;
PASSED();
@@ -19459,7 +19459,7 @@ test_get_link_name_invalid_params(void)
TESTING_2("test cleanup");
if (link_name_buf) {
- HDfree(link_name_buf);
+ free(link_name_buf);
link_name_buf = NULL;
}
@@ -19478,7 +19478,7 @@ error:
H5E_BEGIN_TRY
{
if (link_name_buf)
- HDfree(link_name_buf);
+ free(link_name_buf);
H5Gclose(group_id);
H5Gclose(container_group);
H5Fclose(file_id);
diff --git a/test/API/H5_api_test.c b/test/API/H5_api_test.c
index 411062e..92237f5 100644
--- a/test/API/H5_api_test.c
+++ b/test/API/H5_api_test.c
@@ -286,7 +286,7 @@ main(int argc, char **argv)
}
done:
- HDfree(vol_connector_string_copy);
+ free(vol_connector_string_copy);
if (default_con_id >= 0 && H5VLclose(default_con_id) < 0) {
fprintf(stderr, "Unable to close VOL connector ID\n");
diff --git a/test/API/H5_api_test_util.c b/test/API/H5_api_test_util.c
index cab1de3..d7d330f 100644
--- a/test/API/H5_api_test_util.c
+++ b/test/API/H5_api_test_util.c
@@ -504,7 +504,7 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H
num_members = (size_t)(rand() % ENUM_TYPE_MAX_MEMBERS + 1);
- if (NULL == (enum_member_vals = HDmalloc(num_members * sizeof(int)))) {
+ if (NULL == (enum_member_vals = malloc(num_members * sizeof(int)))) {
printf(" couldn't allocate space for enum members\n");
goto done;
}
@@ -537,7 +537,7 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H
ret_value = datatype;
done:
- HDfree(enum_member_vals);
+ free(enum_member_vals);
if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) {
if (H5Tclose(datatype) < 0)
@@ -558,7 +558,7 @@ generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t
ndims = (unsigned)(rand() % ARRAY_TYPE_MAX_DIMS + 1);
- if (NULL == (array_dims = HDmalloc(ndims * sizeof(*array_dims)))) {
+ if (NULL == (array_dims = malloc(ndims * sizeof(*array_dims)))) {
printf(" couldn't allocate space for array datatype dims\n");
goto done;
}
@@ -579,7 +579,7 @@ generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t
ret_value = datatype;
done:
- HDfree(array_dims);
+ free(array_dims);
if (base_datatype >= 0) {
if (H5Tclose(base_datatype) < 0)
@@ -720,7 +720,7 @@ error:
/*
* Add a prefix to the given filename. The caller
* is responsible for freeing the returned filename
- * pointer with HDfree().
+ * pointer with free().
*/
herr_t
prefix_filename(const char *prefix, const char *filename, char **filename_out)
@@ -744,7 +744,7 @@ prefix_filename(const char *prefix, const char *filename, char **filename_out)
goto done;
}
- if (NULL == (out_buf = HDmalloc(H5_API_TEST_FILENAME_MAX_LENGTH))) {
+ if (NULL == (out_buf = malloc(H5_API_TEST_FILENAME_MAX_LENGTH))) {
printf(" couldn't allocated filename buffer\n");
ret_value = FAIL;
goto done;
@@ -789,7 +789,7 @@ remove_test_file(const char *prefix, const char *filename)
}
done:
- HDfree(prefixed_filename);
+ free(prefixed_filename);
return ret_value;
}
diff --git a/test/API/tarray.c b/test/API/tarray.c
index 5780c66..00f0cf1 100644
--- a/test/API/tarray.c
+++ b/test/API/tarray.c
@@ -1055,7 +1055,7 @@ test_array_alloc_custom(size_t size, void *info)
*/
extra = MAX(sizeof(void *), sizeof(size_t));
- if ((ret_value = HDmalloc(extra + size)) != NULL) {
+ if ((ret_value = malloc(extra + size)) != NULL) {
*(size_t *)ret_value = size;
*mem_used += size;
} /* end if */
@@ -1093,7 +1093,7 @@ test_array_free_custom(void *_mem, void *info)
if (_mem != NULL) {
mem = ((unsigned char *)_mem) - extra;
*mem_used -= *(size_t *)((void *)mem);
- HDfree(mem);
+ free(mem);
} /* end if */
} /* end test_array_free_custom() */
@@ -1136,7 +1136,7 @@ test_array_vlen_atomic(void)
/* Initialize array data to write */
for (i = 0; i < SPACE1_DIM1; i++)
for (j = 0; j < ARRAY1_DIM1; j++) {
- wdata[i][j].p = HDmalloc((size_t)(i + j + 1) * sizeof(unsigned int));
+ wdata[i][j].p = malloc((size_t)(i + j + 1) * sizeof(unsigned int));
wdata[i][j].len = (size_t)(i + j + 1);
for (k = 0; k < (i + j + 1); k++)
((unsigned int *)wdata[i][j].p)[k] = (unsigned int)(i * 100 + j * 10 + k);
@@ -1357,7 +1357,7 @@ test_array_vlen_array(void)
/* Initialize array data to write */
for (i = 0; i < SPACE1_DIM1; i++)
for (j = 0; j < ARRAY1_DIM1; j++) {
- wdata[i][j].p = HDmalloc((size_t)(i + j + 1) * sizeof(unsigned int) * (size_t)ARRAY1_DIM1);
+ wdata[i][j].p = malloc((size_t)(i + j + 1) * sizeof(unsigned int) * (size_t)ARRAY1_DIM1);
wdata[i][j].len = (size_t)(i + j + 1);
for (k = 0; k < (i + j + 1); k++)
for (l = 0; l < ARRAY1_DIM1; l++)
@@ -1632,8 +1632,8 @@ test_array_bkg(void)
/* Initialize the data */
/* ------------------- */
- dtsinfo = (CmpDTSinfo *)HDmalloc(sizeof(CmpDTSinfo));
- CHECK_PTR(dtsinfo, "HDmalloc");
+ dtsinfo = (CmpDTSinfo *)malloc(sizeof(CmpDTSinfo));
+ CHECK_PTR(dtsinfo, "malloc");
HDmemset(dtsinfo, 0, sizeof(CmpDTSinfo));
for (i = 0; i < LENGTH; i++) {
for (j = 0; j < ALEN; j++) {
@@ -1662,7 +1662,7 @@ test_array_bkg(void)
/* Initialize the names of data members */
/* ------------------------------------ */
for (i = 0; i < dtsinfo->nsubfields; i++)
- dtsinfo->name[i] = (char *)HDcalloc((size_t)20, sizeof(char));
+ dtsinfo->name[i] = (char *)calloc((size_t)20, sizeof(char));
HDstrcpy(dtsinfo->name[0], "One");
HDstrcpy(dtsinfo->name[1], "Two");
@@ -1734,7 +1734,7 @@ test_array_bkg(void)
/* Release memory resources */
/* ------------------------ */
for (i = 0; i < dtsinfo->nsubfields; i++)
- HDfree(dtsinfo->name[i]);
+ free(dtsinfo->name[i]);
/* Release IDs */
/* ----------- */
@@ -1885,7 +1885,7 @@ test_array_bkg(void)
status = H5Fclose(fid);
CHECK(status, FAIL, "H5Fclose");
- HDfree(dtsinfo);
+ free(dtsinfo);
} /* end test_array_bkg() */
/*-------------------------------------------------------------------------
diff --git a/test/API/tattr.c b/test/API/tattr.c
index 43d76ab..af96601 100644
--- a/test/API/tattr.c
+++ b/test/API/tattr.c
@@ -308,8 +308,8 @@ test_attr_basic_write(hid_t fapl)
CHECK(attr_name_size, FAIL, "H5Aget_name");
if (attr_name_size > 0) {
- attr_name = (char *)HDcalloc((size_t)(attr_name_size + 1), sizeof(char));
- CHECK_PTR(attr_name, "HDcalloc");
+ attr_name = (char *)calloc((size_t)(attr_name_size + 1), sizeof(char));
+ CHECK_PTR(attr_name, "calloc");
if (attr_name) {
ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name);
@@ -317,7 +317,7 @@ test_attr_basic_write(hid_t fapl)
ret = HDstrcmp(attr_name, ATTR_TMP_NAME);
VERIFY(ret, 0, "HDstrcmp");
- HDfree(attr_name);
+ free(attr_name);
attr_name = NULL;
} /* end if */
} /* end if */
@@ -345,8 +345,8 @@ test_attr_basic_write(hid_t fapl)
CHECK(attr_name_size, FAIL, "H5Aget_name");
if (attr_name_size > 0) {
- attr_name = (char *)HDcalloc((size_t)(attr_name_size + 1), sizeof(char));
- CHECK_PTR(attr_name, "HDcalloc");
+ attr_name = (char *)calloc((size_t)(attr_name_size + 1), sizeof(char));
+ CHECK_PTR(attr_name, "calloc");
if (attr_name) {
ret = (herr_t)H5Aget_name(attr2, (size_t)(attr_name_size + 1), attr_name);
@@ -354,7 +354,7 @@ test_attr_basic_write(hid_t fapl)
ret = HDstrcmp(attr_name, ATTR1A_NAME);
VERIFY(ret, 0, "HDstrcmp");
- HDfree(attr_name);
+ free(attr_name);
attr_name = NULL;
} /* end if */
} /* end if */
@@ -7503,8 +7503,8 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- visited = (hbool_t *)HDmalloc(sizeof(hbool_t) * iter_info.max_visit);
- CHECK_PTR(visited, "HDmalloc");
+ visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit);
+ CHECK_PTR(visited, "malloc");
iter_info.visited = visited;
/* Loop over operating on different indices on link fields */
@@ -7801,7 +7801,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Free the "visited link" array */
- HDfree(visited);
+ free(visited);
} /* test_attr_iterate2() */
/*-------------------------------------------------------------------------
@@ -8815,8 +8815,8 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
MESSAGE(5, ("Testing Writing Shared & Unshared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
- big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK_PTR(big_value, "HDmalloc");
+ big_value = (unsigned *)malloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
+ CHECK_PTR(big_value, "malloc");
HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
@@ -9120,7 +9120,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Release memory */
- HDfree(big_value);
+ free(big_value);
} /* test_attr_shared_write() */
/****************************************************************
@@ -9166,8 +9166,8 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
MESSAGE(5, ("Testing Renaming Shared & Unshared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
- big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK_PTR(big_value, "HDmalloc");
+ big_value = (unsigned *)malloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
+ CHECK_PTR(big_value, "malloc");
HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
@@ -9580,7 +9580,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Release memory */
- HDfree(big_value);
+ free(big_value);
} /* test_attr_shared_rename() */
/****************************************************************
@@ -9625,8 +9625,8 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
MESSAGE(5, ("Testing Deleting Shared & Unshared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
- big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK_PTR(big_value, "HDmalloc");
+ big_value = (unsigned *)malloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
+ CHECK_PTR(big_value, "malloc");
HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
@@ -9964,7 +9964,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Release memory */
- HDfree(big_value);
+ free(big_value);
} /* test_attr_shared_delete() */
/****************************************************************
@@ -10009,8 +10009,8 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
MESSAGE(5, ("Testing Unlinking Object with Shared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
- big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK_PTR(big_value, "HDmalloc");
+ big_value = (unsigned *)malloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
+ CHECK_PTR(big_value, "malloc");
HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
@@ -10336,7 +10336,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Release memory */
- HDfree(big_value);
+ free(big_value);
} /* test_attr_shared_unlink() */
/****************************************************************
@@ -11629,8 +11629,8 @@ test_attr_delete_last_dense(hid_t fcpl, hid_t fapl)
CHECK(aid, FAIL, "H5Acreate2");
/* Allocate the data buffer */
- data = (double *)HDmalloc((size_t)(DIM0 * DIM1) * sizeof(double));
- CHECK_PTR(data, "HDmalloc");
+ data = (double *)malloc((size_t)(DIM0 * DIM1) * sizeof(double));
+ CHECK_PTR(data, "malloc");
/* Initialize the data */
for (i = 0; i < DIM0; i++)
@@ -11671,7 +11671,7 @@ test_attr_delete_last_dense(hid_t fcpl, hid_t fapl)
/* Free the data buffer */
if (data)
- HDfree(data);
+ free(data);
} /* test_attr_delete_last_dense() */
#endif
diff --git a/test/API/tchecksum.c b/test/API/tchecksum.c
index a77ffcd..4aa300e 100644
--- a/test/API/tchecksum.c
+++ b/test/API/tchecksum.c
@@ -180,8 +180,8 @@ test_chksum_large(void)
size_t u; /* Local index variable */
/* Allocate the buffer */
- large_buf = (uint8_t *)HDmalloc((size_t)BUF_LEN);
- CHECK_PTR(large_buf, "HDmalloc");
+ large_buf = (uint8_t *)malloc((size_t)BUF_LEN);
+ CHECK_PTR(large_buf, "malloc");
/* Initialize buffer w/known data */
for (u = 0; u < BUF_LEN; u++)
@@ -209,7 +209,7 @@ test_chksum_large(void)
VERIFY(chksum, 0x930c7afc, "H5_checksum_lookup3");
/* Release memory for buffer */
- HDfree(large_buf);
+ free(large_buf);
} /* test_chksum_large() */
/****************************************************************
diff --git a/test/API/tcoords.c b/test/API/tcoords.c
index 9c66b40..5cd79c5 100644
--- a/test/API/tcoords.c
+++ b/test/API/tcoords.c
@@ -435,18 +435,18 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
hsize_t mem5_block[8] = {4, 5, 1, 4, 2, 1, 6, 2};
/* Initialize dynamic arrays */
- data_buf = HDcalloc(1, sizeof(*data_buf));
- CHECK_PTR(data_buf, "HDcalloc");
- mem1_buffer = HDcalloc(1, sizeof(*mem1_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
- mem2_buffer = HDcalloc(1, sizeof(*mem2_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
- mem3_buffer = HDcalloc(1, sizeof(*mem3_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
- mem4_buffer = HDcalloc(1, sizeof(*mem4_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
- mem5_buffer = HDcalloc(1, sizeof(*mem5_buffer));
- CHECK_PTR(data_buf, "HDcalloc");
+ data_buf = calloc(1, sizeof(*data_buf));
+ CHECK_PTR(data_buf, "calloc");
+ mem1_buffer = calloc(1, sizeof(*mem1_buffer));
+ CHECK_PTR(data_buf, "calloc");
+ mem2_buffer = calloc(1, sizeof(*mem2_buffer));
+ CHECK_PTR(data_buf, "calloc");
+ mem3_buffer = calloc(1, sizeof(*mem3_buffer));
+ CHECK_PTR(data_buf, "calloc");
+ mem4_buffer = calloc(1, sizeof(*mem4_buffer));
+ CHECK_PTR(data_buf, "calloc");
+ mem5_buffer = calloc(1, sizeof(*mem5_buffer));
+ CHECK_PTR(data_buf, "calloc");
/* Create and write the dataset */
sid = H5Screate_simple(8, da_dims, da_dims);
@@ -664,12 +664,12 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
ret = H5Pclose(plid);
CHECK(ret, FAIL, "H5Pclose");
- HDfree(data_buf);
- HDfree(mem1_buffer);
- HDfree(mem2_buffer);
- HDfree(mem3_buffer);
- HDfree(mem4_buffer);
- HDfree(mem5_buffer);
+ free(data_buf);
+ free(mem1_buffer);
+ free(mem2_buffer);
+ free(mem3_buffer);
+ free(mem4_buffer);
+ free(mem5_buffer);
}
/****************************************************************
diff --git a/test/API/testhdf5.c b/test/API/testhdf5.c
index 5e0409c..e863e38 100644
--- a/test/API/testhdf5.c
+++ b/test/API/testhdf5.c
@@ -146,16 +146,16 @@ getenv_all(MPI_Comm comm, int root, const char *name)
MPI_Bcast(&len, 1, MPI_INT, root, comm);
if (len >= 0) {
if (env == NULL)
- env = (char *)HDmalloc((size_t)len + 1);
+ env = (char *)malloc((size_t)len + 1);
else if (HDstrlen(env) < (size_t)len)
- env = (char *)HDrealloc(env, (size_t)len + 1);
+ env = (char *)realloc(env, (size_t)len + 1);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
env[len] = '\0';
}
else {
if (env)
- HDfree(env);
+ free(env);
env = NULL;
}
}
@@ -166,7 +166,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
else {
/* use original getenv */
if (env)
- HDfree(env);
+ free(env);
env = HDgetenv(name);
} /* end if */
diff --git a/test/API/tfile.c b/test/API/tfile.c
index 5462467..bdbf8e6 100644
--- a/test/API/tfile.c
+++ b/test/API/tfile.c
@@ -1230,8 +1230,8 @@ test_get_obj_ids(void)
CHECK(oid_count, FAIL, "H5Fget_obj_count");
VERIFY(oid_count, (NGROUPS + NDSETS + 1), "H5Fget_obj_count");
- oid_list = (hid_t *)HDcalloc((size_t)oid_list_size, sizeof(hid_t));
- CHECK_PTR(oid_list, "HDcalloc");
+ oid_list = (hid_t *)calloc((size_t)oid_list_size, sizeof(hid_t));
+ CHECK_PTR(oid_list, "calloc");
/* Call the public function H5F_get_obj_ids to use H5F__get_objects. User reported having problem here.
* that the returned size (ret_count) from H5Fget_obj_ids is one greater than the size passed in
@@ -1271,7 +1271,7 @@ test_get_obj_ids(void)
H5Sclose(filespace);
H5Fclose(fid);
- HDfree(oid_list);
+ free(oid_list);
/* Reopen the file to check whether H5Fget_obj_count and H5Fget_obj_ids still works
* when the file is closed first */
@@ -1294,8 +1294,8 @@ test_get_obj_ids(void)
CHECK(oid_count, FAIL, "H5Fget_obj_count");
VERIFY(oid_count, NDSETS, "H5Fget_obj_count");
- oid_list = (hid_t *)HDcalloc((size_t)oid_count, sizeof(hid_t));
- CHECK_PTR(oid_list, "HDcalloc");
+ oid_list = (hid_t *)calloc((size_t)oid_count, sizeof(hid_t));
+ CHECK_PTR(oid_list, "calloc");
/* Get the list of all opened objects */
ret_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)oid_count, oid_list);
@@ -1310,7 +1310,7 @@ test_get_obj_ids(void)
}
H5E_END_TRY;
- HDfree(oid_list);
+ free(oid_list);
}
}
@@ -1536,7 +1536,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, hid_t gid2,
if (oid_count > 0) {
hid_t *oid_list;
- oid_list = (hid_t *)HDcalloc((size_t)oid_count, sizeof(hid_t));
+ oid_list = (hid_t *)calloc((size_t)oid_count, sizeof(hid_t));
if (oid_list != NULL) {
int i;
@@ -1586,7 +1586,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, hid_t gid2,
} /* end switch */
} /* end for */
- HDfree(oid_list);
+ free(oid_list);
} /* end if */
} /* end if */
@@ -3245,19 +3245,19 @@ cal_chksum(const char *file, uint32_t *chksum)
CHECK(fdes, FAIL, "HDfstat");
/* Allocate space for the file data */
- file_data = HDmalloc((size_t)sb.st_size);
- CHECK_PTR(file_data, "HDmalloc");
+ file_data = malloc((size_t)sb.st_size);
+ CHECK_PTR(file_data, "malloc");
if (file_data) {
/* Read file's data into memory */
bytes_read = HDread(fdes, file_data, (size_t)sb.st_size);
- CHECK(bytes_read == sb.st_size, FALSE, "HDmalloc");
+ CHECK(bytes_read == sb.st_size, FALSE, "malloc");
/* Calculate checksum */
*chksum = H5_checksum_lookup3(file_data, sizeof(file_data), 0);
/* Free memory */
- HDfree(file_data);
+ free(file_data);
}
/* Close the file */
@@ -4512,7 +4512,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- HDfree(memb_name[mt]);
+ free(memb_name[mt]);
return 0;
diff --git a/test/API/tgenprop.c b/test/API/tgenprop.c
index b22409a..7b25d86 100644
--- a/test/API/tgenprop.c
+++ b/test/API/tgenprop.c
@@ -1027,7 +1027,7 @@ test_genprop_prop_crt_cb1(const char *name, size_t size, void *def_value)
/* Set the information from the creation call */
prop1_cb_info.crt_count++;
prop1_cb_info.crt_name = HDstrdup(name);
- prop1_cb_info.crt_value = HDmalloc(size);
+ prop1_cb_info.crt_value = malloc(size);
HDmemcpy(prop1_cb_info.crt_value, def_value, size);
return (SUCCEED);
@@ -1047,7 +1047,7 @@ test_genprop_prop_set_cb1(hid_t plist_id, const char *name, size_t size, void *v
if (prop1_cb_info.set_name == NULL)
prop1_cb_info.set_name = HDstrdup(name);
if (prop1_cb_info.set_value == NULL)
- prop1_cb_info.set_value = HDmalloc(size);
+ prop1_cb_info.set_value = malloc(size);
HDmemcpy(prop1_cb_info.set_value, value, size);
return (SUCCEED);
@@ -1067,7 +1067,7 @@ test_genprop_prop_get_cb1(hid_t plist_id, const char *name, size_t size, void *v
if (prop1_cb_info.get_name == NULL)
prop1_cb_info.get_name = HDstrdup(name);
if (prop1_cb_info.get_value == NULL)
- prop1_cb_info.get_value = HDmalloc(size);
+ prop1_cb_info.get_value = malloc(size);
HDmemcpy(prop1_cb_info.get_value, value, size);
return (SUCCEED);
@@ -1086,7 +1086,7 @@ test_genprop_prop_cop_cb1(const char *name, size_t size, void *value)
if (prop1_cb_info.cop_name == NULL)
prop1_cb_info.cop_name = HDstrdup(name);
if (prop1_cb_info.cop_value == NULL)
- prop1_cb_info.cop_value = HDmalloc(size);
+ prop1_cb_info.cop_value = malloc(size);
HDmemcpy(prop1_cb_info.cop_value, value, size);
return (SUCCEED);
@@ -1133,7 +1133,7 @@ test_genprop_prop_cls_cb1(const char *name, size_t size, void *value)
if (prop1_cb_info.cls_name == NULL)
prop1_cb_info.cls_name = HDstrdup(name);
if (prop1_cb_info.cls_value == NULL)
- prop1_cb_info.cls_value = HDmalloc(size);
+ prop1_cb_info.cls_value = malloc(size);
HDmemcpy(prop1_cb_info.cls_value, value, size);
return (SUCCEED);
@@ -1151,7 +1151,7 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v
prop2_cb_info.del_count++;
prop2_cb_info.del_plist_id = plist_id;
prop2_cb_info.del_name = HDstrdup(name);
- prop2_cb_info.del_value = HDmalloc(size);
+ prop2_cb_info.del_value = malloc(size);
HDmemcpy(prop2_cb_info.del_value, value, size);
return (SUCCEED);
@@ -1368,18 +1368,18 @@ test_genprop_list_callback(void)
VERIFY(prop1_cb_info.cls_count, 2, "H5Pclose");
/* Free memory allocated for tracking properties */
- HDfree(prop1_cb_info.crt_name);
- HDfree(prop1_cb_info.crt_value);
- HDfree(prop1_cb_info.get_name);
- HDfree(prop1_cb_info.get_value);
- HDfree(prop1_cb_info.set_name);
- HDfree(prop1_cb_info.set_value);
- HDfree(prop1_cb_info.cop_name);
- HDfree(prop1_cb_info.cop_value);
- HDfree(prop1_cb_info.cls_name);
- HDfree(prop1_cb_info.cls_value);
- HDfree(prop2_cb_info.del_name);
- HDfree(prop2_cb_info.del_value);
+ free(prop1_cb_info.crt_name);
+ free(prop1_cb_info.crt_value);
+ free(prop1_cb_info.get_name);
+ free(prop1_cb_info.get_value);
+ free(prop1_cb_info.set_name);
+ free(prop1_cb_info.set_value);
+ free(prop1_cb_info.cop_name);
+ free(prop1_cb_info.cop_value);
+ free(prop1_cb_info.cls_name);
+ free(prop1_cb_info.cls_value);
+ free(prop2_cb_info.del_name);
+ free(prop2_cb_info.del_value);
/* Close class */
ret = H5Pclose_class(cid1);
diff --git a/test/API/th5o.c b/test/API/th5o.c
index 916f005..bda3c93 100644
--- a/test/API/th5o.c
+++ b/test/API/th5o.c
@@ -962,10 +962,10 @@ test_h5o_link(void)
/* Allocate memory buffers */
/* (These are treated as 2-D buffers) */
- wdata = (int *)HDmalloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
- CHECK_PTR(wdata, "HDmalloc");
- rdata = (int *)HDmalloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
- CHECK_PTR(rdata, "HDmalloc");
+ wdata = (int *)malloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
+ CHECK_PTR(wdata, "malloc");
+ rdata = (int *)malloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
+ CHECK_PTR(rdata, "malloc");
/* Initialize the raw data */
for (i = n = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++)
@@ -1088,8 +1088,8 @@ test_h5o_link(void)
CHECK(ret, FAIL, "H5Pclose");
/* Release buffers */
- HDfree(wdata);
- HDfree(rdata);
+ free(wdata);
+ free(rdata);
} /* end test_h5o_link() */
#if 0
diff --git a/test/API/th5s.c b/test/API/th5s.c
index 3e403e7..e5c8031 100644
--- a/test/API/th5s.c
+++ b/test/API/th5s.c
@@ -1274,8 +1274,8 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
CHECK(ret, FAIL, "H5Sencode2");
if (sbuf_size > 0) {
- sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size);
- CHECK_PTR(sbuf, "HDcalloc");
+ sbuf = (unsigned char *)calloc((size_t)1, sbuf_size);
+ CHECK_PTR(sbuf, "calloc");
}
/* Try decoding bogus buffer */
@@ -1336,8 +1336,8 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
CHECK(ret, FAIL, "H5Sencode");
if (null_size > 0) {
- null_sbuf = (unsigned char *)HDcalloc((size_t)1, null_size);
- CHECK_PTR(null_sbuf, "HDcalloc");
+ null_sbuf = (unsigned char *)calloc((size_t)1, null_size);
+ CHECK_PTR(null_sbuf, "calloc");
}
/* Encode the null dataspace in the buffer */
@@ -1372,8 +1372,8 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
CHECK(ret, FAIL, "H5Sencode");
if (scalar_size > 0) {
- scalar_buf = (unsigned char *)HDcalloc((size_t)1, scalar_size);
- CHECK_PTR(scalar_buf, "HDcalloc");
+ scalar_buf = (unsigned char *)calloc((size_t)1, scalar_size);
+ CHECK_PTR(scalar_buf, "calloc");
}
/* Encode the scalar dataspace in the buffer */
@@ -1411,11 +1411,11 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
/* Release resources */
if (sbuf)
- HDfree(sbuf);
+ free(sbuf);
if (null_sbuf)
- HDfree(null_sbuf);
+ free(null_sbuf);
if (scalar_buf)
- HDfree(scalar_buf);
+ free(scalar_buf);
} /* test_h5s_encode() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -1466,8 +1466,8 @@ test_h5s_encode1(void)
CHECK(ret, FAIL, "H5Sencode2");
if (sbuf_size > 0) {
- sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size);
- CHECK_PTR(sbuf, "HDcalloc");
+ sbuf = (unsigned char *)calloc((size_t)1, sbuf_size);
+ CHECK_PTR(sbuf, "calloc");
}
/* Try decoding bogus buffer */
@@ -1528,8 +1528,8 @@ test_h5s_encode1(void)
CHECK(ret, FAIL, "H5Sencode");
if (null_size > 0) {
- null_sbuf = (unsigned char *)HDcalloc((size_t)1, null_size);
- CHECK_PTR(null_sbuf, "HDcalloc");
+ null_sbuf = (unsigned char *)calloc((size_t)1, null_size);
+ CHECK_PTR(null_sbuf, "calloc");
}
/* Encode the null dataspace in the buffer */
@@ -1564,8 +1564,8 @@ test_h5s_encode1(void)
CHECK(ret, FAIL, "H5Sencode");
if (scalar_size > 0) {
- scalar_buf = (unsigned char *)HDcalloc((size_t)1, scalar_size);
- CHECK_PTR(scalar_buf, "HDcalloc");
+ scalar_buf = (unsigned char *)calloc((size_t)1, scalar_size);
+ CHECK_PTR(scalar_buf, "calloc");
}
/* Encode the scalar dataspace in the buffer */
@@ -1599,11 +1599,11 @@ test_h5s_encode1(void)
/* Release resources */
if (sbuf)
- HDfree(sbuf);
+ free(sbuf);
if (null_sbuf)
- HDfree(null_sbuf);
+ free(null_sbuf);
if (scalar_buf)
- HDfree(scalar_buf);
+ free(scalar_buf);
} /* test_h5s_encode1() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -1651,8 +1651,8 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
CHECK(ret, FAIL, "H5Sencode2");
/* Allocate the buffer for encoding */
- buf = (char *)HDmalloc(buf_size);
- CHECK_PTR(buf, "HDmalloc");
+ buf = (char *)malloc(buf_size);
+ CHECK_PTR(buf, "malloc");
/* Encode according to the setting in in_fapl */
ret = H5Sencode2(in_sid, buf, &buf_size, in_fapl);
@@ -1711,7 +1711,7 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
ret = H5Sclose(d_sid);
CHECK(ret, FAIL, "H5Sclose");
if (buf)
- HDfree(buf);
+ free(buf);
}
return (0);
@@ -2177,7 +2177,7 @@ test_h5s_encode_length(void)
/* Allocate the buffer */
if (sbuf_size > 0) {
- sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size);
+ sbuf = (unsigned char *)calloc((size_t)1, sbuf_size);
CHECK_PTR(sbuf, "H5Sencode2");
}
@@ -2202,7 +2202,7 @@ test_h5s_encode_length(void)
/* Free the buffer */
if (sbuf)
- HDfree(sbuf);
+ free(sbuf);
/* Close the original dataspace */
ret = H5Sclose(sid);
@@ -2531,17 +2531,17 @@ test_h5s_chunk(void)
int i, j;
/* Allocate memory */
- chunk_data_dbl_data = (double *)HDcalloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(double));
- CHECK_PTR(chunk_data_dbl_data, "HDcalloc");
- chunk_data_dbl = (double **)HDcalloc(CHUNK_DATA_NX, sizeof(chunk_data_dbl_data));
- CHECK_PTR(chunk_data_dbl, "HDcalloc");
+ chunk_data_dbl_data = (double *)calloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(double));
+ CHECK_PTR(chunk_data_dbl_data, "calloc");
+ chunk_data_dbl = (double **)calloc(CHUNK_DATA_NX, sizeof(chunk_data_dbl_data));
+ CHECK_PTR(chunk_data_dbl, "calloc");
for (i = 0; i < CHUNK_DATA_NX; i++)
chunk_data_dbl[i] = chunk_data_dbl_data + (i * CHUNK_DATA_NY);
- chunk_data_flt_data = (float *)HDcalloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(float));
- CHECK_PTR(chunk_data_flt_data, "HDcalloc");
- chunk_data_flt = (float **)HDcalloc(CHUNK_DATA_NX, sizeof(chunk_data_flt_data));
- CHECK_PTR(chunk_data_flt, "HDcalloc");
+ chunk_data_flt_data = (float *)calloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(float));
+ CHECK_PTR(chunk_data_flt_data, "calloc");
+ chunk_data_flt = (float **)calloc(CHUNK_DATA_NX, sizeof(chunk_data_flt_data));
+ CHECK_PTR(chunk_data_flt, "calloc");
for (i = 0; i < CHUNK_DATA_NX; i++)
chunk_data_flt[i] = chunk_data_flt_data + (i * CHUNK_DATA_NY);
@@ -2611,10 +2611,10 @@ test_h5s_chunk(void)
} /* end for */
} /* end for */
- HDfree(chunk_data_dbl);
- HDfree(chunk_data_dbl_data);
- HDfree(chunk_data_flt);
- HDfree(chunk_data_flt_data);
+ free(chunk_data_dbl);
+ free(chunk_data_dbl_data);
+ free(chunk_data_flt);
+ free(chunk_data_flt_data);
} /* test_h5s_chunk() */
/****************************************************************
diff --git a/test/API/tid.c b/test/API/tid.c
index 2dd8851..3433b20 100644
--- a/test/API/tid.c
+++ b/test/API/tid.c
@@ -34,7 +34,7 @@
static herr_t
free_wrapper(void *p, void H5_ATTR_UNUSED **_ctx)
{
- HDfree(p);
+ free(p);
return SUCCEED;
}
@@ -98,12 +98,12 @@ basic_id_test(void)
* Once the ID has been registered, testObj will be freed when
* its ID type is destroyed.
*/
- testObj = HDmalloc(7 * sizeof(int));
+ testObj = malloc(7 * sizeof(int));
arrayID = H5Iregister(myType, testObj);
CHECK(arrayID, H5I_INVALID_HID, "H5Iregister");
if (arrayID == H5I_INVALID_HID) {
- HDfree(testObj);
+ free(testObj);
goto out;
}
@@ -192,12 +192,12 @@ basic_id_test(void)
* freed when the previous type was destroyed. Allocate new
* memory for it.
*/
- testObj = HDmalloc(7 * sizeof(int));
+ testObj = malloc(7 * sizeof(int));
arrayID = H5Iregister(myType, testObj);
CHECK(arrayID, H5I_INVALID_HID, "H5Iregister");
if (arrayID == H5I_INVALID_HID) {
- HDfree(testObj);
+ free(testObj);
goto out;
}
@@ -272,7 +272,7 @@ id_predefined_test(void)
void *testPtr;
herr_t testErr;
- testObj = HDmalloc(sizeof(int));
+ testObj = malloc(sizeof(int));
/*
* Attempt to perform public functions on various library types
@@ -363,14 +363,14 @@ id_predefined_test(void)
/* testObj was never registered as an atom, so it will not be
* automatically freed. */
- HDfree(testObj);
+ free(testObj);
return 0;
out:
if (typeID != H5I_INVALID_HID)
H5Tclose(typeID);
if (testObj != NULL)
- HDfree(testObj);
+ free(testObj);
return -1;
}
@@ -720,8 +720,8 @@ test_remove_clear_type(void)
/* Create an array to hold the objects in the master list */
list_size = RCT_MAX_NOBJS * sizeof(rct_obj_t);
- obj_list.objects = HDmalloc(list_size);
- CHECK_PTR(obj_list.objects, "HDcalloc");
+ obj_list.objects = malloc(list_size);
+ CHECK_PTR(obj_list.objects, "calloc");
if (NULL == obj_list.objects)
goto error;
@@ -866,7 +866,7 @@ test_remove_clear_type(void)
goto error;
/* Free the object array */
- HDfree(obj_list.objects);
+ free(obj_list.objects);
return 0;
@@ -878,7 +878,7 @@ error:
}
H5E_END_TRY
- HDfree(obj_list.objects);
+ free(obj_list.objects);
return -1;
} /* end test_remove_clear_type() */
@@ -901,7 +901,7 @@ free_actual_object(void *_p, void H5_ATTR_UNUSED **_ctx)
if (7 != *p)
return FAIL;
- HDfree(p);
+ free(p);
return SUCCEED;
}
@@ -934,7 +934,7 @@ realize_future_cb(void *_future_obj, hid_t *actual_id)
}
else {
/* Create a new object (the 'actual object') of the correct type */
- if (NULL == (actual_obj = HDmalloc(sizeof(int))))
+ if (NULL == (actual_obj = malloc(sizeof(int))))
return FAIL;
*actual_obj = 7;
@@ -955,7 +955,7 @@ discard_future_cb(void *future_obj)
if (NULL == future_obj)
return FAIL;
- HDfree(future_obj);
+ free(future_obj);
return SUCCEED;
}
@@ -970,7 +970,7 @@ realize_future_generate_cb(void *_future_obj, hid_t *actual_id)
if (NULL != future_obj)
return FAIL;
/* Create a new object (the 'actual object') of the correct type */
- if (NULL == (actual_obj = HDmalloc(sizeof(int))))
+ if (NULL == (actual_obj = malloc(sizeof(int))))
return FAIL;
*actual_obj = 7;
@@ -1054,7 +1054,7 @@ test_future_ids(void)
/* Test base use-case: create a future object and destroy type without
* realizing the future object.
*/
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = obj_type;
future_id = H5Iregister_future(obj_type, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1074,7 +1074,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object and realize the actual object. */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = obj_type;
future_id = H5Iregister_future(obj_type, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1160,7 +1160,7 @@ test_future_ids(void)
/* Test base use-case: create a future object for a pre-defined type */
/* (DATASPACE) */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATASPACE;
future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1178,7 +1178,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATASPACE;
future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1201,7 +1201,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATASPACE;
future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1232,7 +1232,7 @@ test_future_ids(void)
/* Test base use-case: create a future object for a pre-defined type */
/* (DATATYPE) */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATATYPE;
future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1250,7 +1250,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATATYPE;
future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1273,7 +1273,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_DATATYPE;
future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1304,7 +1304,7 @@ test_future_ids(void)
/* Test base use-case: create a future object for a pre-defined type */
/* (PROPERTY LIST) */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_GENPROP_LST;
future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1322,7 +1322,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_GENPROP_LST;
future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
@@ -1345,7 +1345,7 @@ test_future_ids(void)
goto error;
/* Test base use-case: create a future object for a pre-defined type */
- future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj = malloc(sizeof(future_obj_t));
future_obj->obj_type = H5I_GENPROP_LST;
future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb);
CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
diff --git a/test/API/titerate.c b/test/API/titerate.c
index 343c601..b50542c 100644
--- a/test/API/titerate.c
+++ b/test/API/titerate.c
@@ -381,7 +381,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
/* Free the dataset names */
for (i = 0; i < (NDATASETS + 2); i++)
- HDfree(lnames[i]);
+ free(lnames[i]);
}
} /* test_iter_group() */
@@ -590,7 +590,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
/* Free the attribute names */
for (i = 0; i < NATTR; i++)
- HDfree(anames[i]);
+ free(anames[i]);
}
} /* test_iter_attr() */
@@ -672,8 +672,8 @@ test_iter_group_large(hid_t fapl)
} s1_t;
/* Allocate & initialize array */
- names = (iter_info *)HDcalloc(sizeof(iter_info), (ITER_NGROUPS + 2));
- CHECK_PTR(names, "HDcalloc");
+ names = (iter_info *)calloc(sizeof(iter_info), (ITER_NGROUPS + 2));
+ CHECK_PTR(names, "calloc");
/* Output message about test being performed */
MESSAGE(5, ("Testing Large Group Iteration Functionality\n"));
@@ -768,7 +768,7 @@ test_iter_group_large(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
/* Release memory */
- HDfree(names);
+ free(names);
}
} /* test_iterate_group_large() */
@@ -921,8 +921,8 @@ test_grp_memb_funcs(hid_t fapl)
/* Free the dataset names */
for (i = 0; i < (NDATASETS + 2); i++) {
- HDfree(dnames[i]);
- HDfree(obj_names[i]);
+ free(dnames[i]);
+ free(obj_names[i]);
} /* end for */
} /* test_grp_memb_funcs() */
diff --git a/test/API/tmisc.c b/test/API/tmisc.c
index 4696bda..eb827a2 100644
--- a/test/API/tmisc.c
+++ b/test/API/tmisc.c
@@ -568,8 +568,8 @@ test_misc2_write_attribute(void)
ret = H5Fclose(file2);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(string_att1);
- HDfree(string_att2);
+ free(string_att1);
+ free(string_att2);
}
static void
@@ -782,7 +782,7 @@ create_struct3(void)
misc5_struct3_hndl *str3hndl; /* New 'struct3' created */
herr_t ret; /* For error checking */
- str3hndl = (misc5_struct3_hndl *)HDmalloc(sizeof(misc5_struct3_hndl));
+ str3hndl = (misc5_struct3_hndl *)malloc(sizeof(misc5_struct3_hndl));
CHECK_PTR(str3hndl, "malloc");
str3hndl->st3h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct3));
@@ -808,7 +808,7 @@ delete_struct3(misc5_struct3_hndl *str3hndl)
ret = H5Tclose(str3hndl->st3h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str3hndl);
+ free(str3hndl);
}
static void
@@ -825,8 +825,8 @@ create_struct2(void)
misc5_struct2_hndl *str2hndl; /* New 'struct2' created */
herr_t ret; /* For error checking */
- str2hndl = (misc5_struct2_hndl *)HDmalloc(sizeof(misc5_struct2_hndl));
- CHECK_PTR(str2hndl, "HDmalloc");
+ str2hndl = (misc5_struct2_hndl *)malloc(sizeof(misc5_struct2_hndl));
+ CHECK_PTR(str2hndl, "malloc");
str2hndl->st2h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct2));
CHECK(str2hndl->st2h_base, FAIL, "H5Tcreate");
@@ -860,7 +860,7 @@ delete_struct2(misc5_struct2_hndl *str2hndl)
H5Tclose(str2hndl->st2h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str2hndl);
+ free(str2hndl);
}
static void
@@ -871,8 +871,8 @@ set_struct2(misc5_struct2 *buf)
buf->st2_el1 = MISC5_DBGELVAL2;
buf->st2_el2.len = MISC5_DBGNELM3;
- buf->st2_el2.p = HDmalloc((buf->st2_el2.len) * sizeof(misc5_struct3));
- CHECK_PTR(buf->st2_el2.p, "HDmalloc");
+ buf->st2_el2.p = malloc((buf->st2_el2.len) * sizeof(misc5_struct3));
+ CHECK_PTR(buf->st2_el2.p, "malloc");
for (i = 0; i < (buf->st2_el2.len); i++)
set_struct3(&(((misc5_struct3 *)(buf->st2_el2.p))[i]));
@@ -881,7 +881,7 @@ set_struct2(misc5_struct2 *buf)
static void
clear_struct2(misc5_struct2 *buf)
{
- HDfree(buf->st2_el2.p);
+ free(buf->st2_el2.p);
}
/*********************** struct1 ***********************/
@@ -892,8 +892,8 @@ create_struct1(void)
misc5_struct1_hndl *str1hndl; /* New 'struct1' created */
herr_t ret; /* For error checking */
- str1hndl = (misc5_struct1_hndl *)HDmalloc(sizeof(misc5_struct1_hndl));
- CHECK_PTR(str1hndl, "HDmalloc");
+ str1hndl = (misc5_struct1_hndl *)malloc(sizeof(misc5_struct1_hndl));
+ CHECK_PTR(str1hndl, "malloc");
str1hndl->st1h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct1));
CHECK(str1hndl->st1h_base, FAIL, "H5Tcreate");
@@ -927,7 +927,7 @@ delete_struct1(misc5_struct1_hndl *str1hndl)
ret = H5Tclose(str1hndl->st1h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str1hndl);
+ free(str1hndl);
}
static void
@@ -938,8 +938,8 @@ set_struct1(misc5_struct1 *buf)
buf->st1_el1 = MISC5_DBGELVAL1;
buf->st1_el2.len = MISC5_DBGNELM2;
- buf->st1_el2.p = HDmalloc((buf->st1_el2.len) * sizeof(misc5_struct2));
- CHECK_PTR(buf->st1_el2.p, "HDmalloc");
+ buf->st1_el2.p = malloc((buf->st1_el2.len) * sizeof(misc5_struct2));
+ CHECK_PTR(buf->st1_el2.p, "malloc");
for (i = 0; i < (buf->st1_el2.len); i++)
set_struct2(&(((misc5_struct2 *)(buf->st1_el2.p))[i]));
@@ -952,7 +952,7 @@ clear_struct1(misc5_struct1 *buf)
for (i = 0; i < buf->st1_el2.len; i++)
clear_struct2(&(((misc5_struct2 *)(buf->st1_el2.p))[i]));
- HDfree(buf->st1_el2.p);
+ free(buf->st1_el2.p);
}
static void
@@ -989,8 +989,8 @@ test_misc5(void)
/* Create the variable-length buffer */
buf.len = MISC5_DBGNELM1;
- buf.p = HDmalloc((buf.len) * sizeof(misc5_struct1));
- CHECK_PTR(buf.p, "HDmalloc");
+ buf.p = malloc((buf.len) * sizeof(misc5_struct1));
+ CHECK_PTR(buf.p, "malloc");
/* Create the top-level VL information */
for (i = 0; i < MISC5_DBGNELM1; i++)
@@ -1005,7 +1005,7 @@ test_misc5(void)
clear_struct1(&(((misc5_struct1 *)(buf.p))[j]));
/* Free the variable-length buffer */
- HDfree(buf.p);
+ free(buf.p);
/* Close dataset */
ret = H5Dclose(dataset_id);
@@ -1323,11 +1323,11 @@ test_misc8(void)
MESSAGE(5, ("Testing dataset storage sizes\n"));
/* Allocate space for the data to write & read */
- wdata = (int *)HDmalloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
- CHECK_PTR(wdata, "HDmalloc");
+ wdata = (int *)malloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
+ CHECK_PTR(wdata, "malloc");
#ifdef VERIFY_DATA
- rdata = (int *)HDmalloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
- CHECK_PTR(rdata, "HDmalloc");
+ rdata = (int *)malloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
+ CHECK_PTR(rdata, "malloc");
#endif /* VERIFY_DATA */
/* Initialize values */
@@ -1794,9 +1794,9 @@ test_misc8(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free the read & write buffers */
- HDfree(wdata);
+ free(wdata);
#ifdef VERIFY_DATA
- HDfree(rdata);
+ free(rdata);
#endif /* VERIFY_DATA */
} /* end test_misc8() */
#endif
@@ -2264,8 +2264,8 @@ misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
herr_t ret; /* Generic return value */
/* Create a data buffer for the dataset read */
- read_data = (unsigned *)HDcalloc(MISC13_DIM1, sizeof(unsigned));
- CHECK_PTR(read_data, "HDcalloc");
+ read_data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
+ CHECK_PTR(read_data, "calloc");
/* Open the contiguous dataset in the root group */
dsid = H5Dopen2(loc_id, name, H5P_DEFAULT);
@@ -2284,7 +2284,7 @@ misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
CHECK(ret, FAIL, "H5Dclose");
/* Free the dataset read buffer */
- HDfree(read_data);
+ free(read_data);
} /* end misc13_verify_dataset() */
@@ -2390,8 +2390,8 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
int ret; /* Generic status value */
/* Allocate space for the user block */
- user_block = HDcalloc(size, (size_t)1);
- CHECK_PTR(user_block, "HDcalloc");
+ user_block = calloc(size, (size_t)1);
+ CHECK_PTR(user_block, "calloc");
/* Copy in the user block data */
HDmemcpy(user_block, str, HDstrlen(str));
@@ -2409,8 +2409,8 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
CHECK_PTR(old_fp, "HDfopen");
/* Allocate space for the copy buffer */
- copy_buf = HDmalloc((size_t)MISC13_COPY_BUF_SIZE);
- CHECK_PTR(copy_buf, "HDmalloc");
+ copy_buf = malloc((size_t)MISC13_COPY_BUF_SIZE);
+ CHECK_PTR(copy_buf, "malloc");
/* Copy data from the old file to the new file */
while ((read_in = HDfread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) {
@@ -2428,10 +2428,10 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
VERIFY(ret, 0, "HDfclose");
/* Free the copy buffer */
- HDfree(copy_buf);
+ free(copy_buf);
/* Free the user block */
- HDfree(user_block);
+ free(user_block);
} /* end misc13_insert_user_block() */
@@ -2559,8 +2559,8 @@ test_misc13(void)
hbool_t check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
/* Create a data buffer for the datasets */
- data = (unsigned *)HDcalloc(MISC13_DIM1, sizeof(unsigned));
- CHECK_PTR(data, "HDcalloc");
+ data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
+ CHECK_PTR(data, "calloc");
/* Initialize data to write */
misc13_init_data(data);
@@ -2590,7 +2590,7 @@ test_misc13(void)
misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Free the dataset buffer */
- HDfree(data);
+ free(data);
} /* end test_misc13() */
#endif
@@ -3718,7 +3718,7 @@ test_misc19(void)
H5E_END_TRY;
VERIFY(ret, FAIL, "H5FDunregister");
- HDfree(vfd_cls);
+ free(vfd_cls);
/* Check H5I operations on virtual object connectors */
@@ -3758,7 +3758,7 @@ test_misc19(void)
H5E_END_TRY;
VERIFY(ret, FAIL, "H5VLunregister_connector");
- HDfree(vol_cls);
+ free(vol_cls);
#endif
} /* end test_misc19() */
@@ -3968,8 +3968,8 @@ test_misc21(void)
MESSAGE(5, ("Testing late allocation time w/chunks & filters\n"));
/* Allocate space for the buffer */
- buf = (char *)HDcalloc(MISC21_SPACE_DIM0 * MISC21_SPACE_DIM1, 1);
- CHECK(buf, NULL, "HDcalloc");
+ buf = (char *)calloc(MISC21_SPACE_DIM0 * MISC21_SPACE_DIM1, 1);
+ CHECK(buf, NULL, "calloc");
/* Create the file */
fid = H5Fcreate(MISC21_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -4009,7 +4009,7 @@ test_misc21(void)
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(buf);
+ free(buf);
} /* end test_misc21() */
/****************************************************************
@@ -4053,8 +4053,8 @@ test_misc22(void)
MESSAGE(5, ("Testing datatypes with SZIP filter\n"));
/* Allocate space for the buffer */
- buf = (char *)HDcalloc(MISC22_SPACE_DIM0 * MISC22_SPACE_DIM1, 8);
- CHECK(buf, NULL, "HDcalloc");
+ buf = (char *)calloc(MISC22_SPACE_DIM0 * MISC22_SPACE_DIM1, 8);
+ CHECK(buf, NULL, "calloc");
/* Create the file */
fid = H5Fcreate(MISC22_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -4160,7 +4160,7 @@ test_misc22(void)
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(buf);
+ free(buf);
} /* end test_misc22() */
#endif /* H5_HAVE_FILTER_SZIP */
diff --git a/test/API/trefer.c b/test/API/trefer.c
index ea8888c..d1a6550 100644
--- a/test/API/trefer.c
+++ b/test/API/trefer.c
@@ -112,10 +112,10 @@ test_reference_params(void)
MESSAGE(5, ("Testing Reference Parameters\n"));
/* Allocate write & read buffers */
- wbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- tbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ wbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ tbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -411,10 +411,10 @@ test_reference_params(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(tbuf);
- HDfree(obuf);
+ free(wbuf);
+ free(rbuf);
+ free(tbuf);
+ free(obuf);
} /* test_reference_params() */
/****************************************************************
@@ -445,10 +445,10 @@ test_reference_obj(void)
MESSAGE(5, ("Testing Object Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ wbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ ibuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -645,10 +645,10 @@ test_reference_obj(void)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(ibuf);
- HDfree(obuf);
+ free(wbuf);
+ free(rbuf);
+ free(ibuf);
+ free(obuf);
} /* test_reference_obj() */
/****************************************************************
@@ -682,9 +682,9 @@ test_reference_vlen_obj(void)
MESSAGE(5, ("Testing Object Reference Functions within VLEN type\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ wbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ ibuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -911,10 +911,10 @@ test_reference_vlen_obj(void)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(ibuf);
- HDfree(obuf);
+ free(wbuf);
+ free(rbuf);
+ free(ibuf);
+ free(obuf);
} /* test_reference_vlen_obj() */
/****************************************************************
@@ -946,8 +946,8 @@ test_reference_cmpnd_obj(void)
MESSAGE(5, ("Testing Object Reference Functions within compound type\n"));
/* Allocate write & read buffers */
- ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ ibuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -1202,8 +1202,8 @@ test_reference_cmpnd_obj(void)
CHECK(ret, FAIL, "H5Rdestroy");
/* Free memory buffers */
- HDfree(ibuf);
- HDfree(obuf);
+ free(ibuf);
+ free(obuf);
} /* test_reference_cmpnd_obj() */
/****************************************************************
@@ -1255,10 +1255,10 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
MESSAGE(5, ("Testing Dataset Region Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- dwbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ wbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ dwbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ drbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
for (tu8 = dwbuf, i = 0; i < (SPACE2_DIM1 * SPACE2_DIM2); i++)
*tu8++ = (uint8_t)(i * 3);
@@ -1529,7 +1529,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 1, "H5Sget_select_hyper_nblocks");
/* allocate space for the hyperslab blocks */
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t) * 2);
+ coords = (hsize_t *)malloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t) * 2);
ret = H5Sget_select_hyper_blocklist(sid2, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
@@ -1537,7 +1537,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[1], 2, "Hyperslab Coordinates");
VERIFY(coords[2], 7, "Hyperslab Coordinates");
VERIFY(coords[3], 7, "Hyperslab Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid2, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 2, "Selection Bounds");
@@ -1560,7 +1560,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, SPACE2_DIM2, "H5Sget_select_elem_npoints");
/* allocate space for the element points */
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t));
ret = H5Sget_select_elem_pointlist(sid2, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
@@ -1584,7 +1584,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[17], coord1[8][1], "Element Coordinates");
VERIFY(coords[18], coord1[9][0], "Element Coordinates");
VERIFY(coords[19], coord1[9][1], "Element Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid2, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 0, "Selection Bounds");
@@ -1661,10 +1661,10 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
+ free(wbuf);
+ free(rbuf);
+ free(dwbuf);
+ free(drbuf);
} /* test_reference_region() */
@@ -1711,10 +1711,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
MESSAGE(5, ("Testing 1-D Dataset Region Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), (size_t)SPACE1_DIM1);
- rbuf = HDcalloc(sizeof(H5R_ref_t), (size_t)SPACE1_DIM1);
- dwbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
- drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
+ wbuf = calloc(sizeof(H5R_ref_t), (size_t)SPACE1_DIM1);
+ rbuf = calloc(sizeof(H5R_ref_t), (size_t)SPACE1_DIM1);
+ dwbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
+ drbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)SPACE3_DIM1);
for (tu8 = dwbuf, i = 0; i < SPACE3_DIM1; i++)
*tu8++ = (uint8_t)(i * 3);
@@ -1889,7 +1889,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 15, "H5Sget_select_hyper_nblocks");
/* allocate space for the hyperslab blocks */
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t) * 2);
+ coords = (hsize_t *)malloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t) * 2);
ret = H5Sget_select_hyper_blocklist(sid3, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
@@ -1923,7 +1923,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[27], 68, "Hyperslab Coordinates");
VERIFY(coords[28], 72, "Hyperslab Coordinates");
VERIFY(coords[29], 73, "Hyperslab Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid3, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 2, "Selection Bounds");
@@ -1944,7 +1944,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 10, "H5Sget_select_elem_npoints");
/* allocate space for the element points */
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t));
ret = H5Sget_select_elem_pointlist(sid3, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
@@ -1958,7 +1958,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(coords[7], coord1[7][0], "Element Coordinates");
VERIFY(coords[8], coord1[8][0], "Element Coordinates");
VERIFY(coords[9], coord1[9][0], "Element Coordinates");
- HDfree(coords);
+ free(coords);
ret = H5Sget_select_bounds(sid3, low, high);
CHECK(ret, FAIL, "H5Sget_select_bounds");
VERIFY(low[0], 3, "Selection Bounds");
@@ -2002,10 +2002,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
+ free(wbuf);
+ free(rbuf);
+ free(dwbuf);
+ free(drbuf);
} /* test_reference_region_1D() */
@@ -2861,10 +2861,10 @@ test_reference_compat_conv(void)
MESSAGE(5, ("Testing Deprecated Object Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf_obj = (hobj_ref_t *)HDcalloc(sizeof(hobj_ref_t), SPACE1_DIM1);
- rbuf_obj = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- wbuf_reg = HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
- rbuf_reg = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ wbuf_obj = (hobj_ref_t *)calloc(sizeof(hobj_ref_t), SPACE1_DIM1);
+ rbuf_obj = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ wbuf_reg = calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ rbuf_reg = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
/* Create file */
fid1 = H5Fcreate(FILE_REF_COMPAT, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3131,10 +3131,10 @@ test_reference_compat_conv(void)
}
/* Free memory buffers */
- HDfree(wbuf_obj);
- HDfree(rbuf_obj);
- HDfree(wbuf_reg);
- HDfree(rbuf_reg);
+ free(wbuf_obj);
+ free(rbuf_obj);
+ free(wbuf_reg);
+ free(rbuf_reg);
} /* test_reference_compat() */
#endif
@@ -3174,17 +3174,17 @@ test_reference_perf(void)
MESSAGE(5, ("Testing Object Reference Performance\n"));
/* Allocate write & read buffers */
- wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
- wbuf_deprec = (hobj_ref_t *)HDcalloc(sizeof(hobj_ref_t), SPACE1_DIM1);
- rbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf_deprec = (hobj_ref_t *)HDcalloc(sizeof(hobj_ref_t), SPACE1_DIM1);
- tbuf = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- wbuf_reg = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf_reg = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- wbuf_reg_deprec = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
- rbuf_reg_deprec = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ wbuf = calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ obuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ ibuf = calloc(sizeof(unsigned), SPACE1_DIM1);
+ wbuf_deprec = (hobj_ref_t *)calloc(sizeof(hobj_ref_t), SPACE1_DIM1);
+ rbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf_deprec = (hobj_ref_t *)calloc(sizeof(hobj_ref_t), SPACE1_DIM1);
+ tbuf = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ wbuf_reg = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ rbuf_reg = (H5R_ref_t *)calloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ wbuf_reg_deprec = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ rbuf_reg_deprec = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
for (i = 0; i < SPACE1_DIM1; i++)
obuf[i] = i * 3;
@@ -3543,17 +3543,17 @@ test_reference_perf(void)
}
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(wbuf_reg);
- HDfree(rbuf_reg);
- HDfree(wbuf_deprec);
- HDfree(rbuf_deprec);
- HDfree(wbuf_reg_deprec);
- HDfree(rbuf_reg_deprec);
- HDfree(tbuf);
- HDfree(ibuf);
- HDfree(obuf);
+ free(wbuf);
+ free(rbuf);
+ free(wbuf_reg);
+ free(rbuf_reg);
+ free(wbuf_deprec);
+ free(rbuf_deprec);
+ free(wbuf_reg_deprec);
+ free(rbuf_reg_deprec);
+ free(tbuf);
+ free(ibuf);
+ free(obuf);
} /* test_reference_perf() */
/****************************************************************
diff --git a/test/API/tselect.c b/test/API/tselect.c
index 34c90c3..9547b74 100644
--- a/test/API/tselect.c
+++ b/test/API/tselect.c
@@ -248,10 +248,10 @@ test_select_hyper(hid_t xfer_plist)
MESSAGE(5, ("Testing Hyperslab Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -435,8 +435,8 @@ test_select_hyper(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper() */
struct pnt_iter {
@@ -502,10 +502,10 @@ test_select_point(hid_t xfer_plist)
MESSAGE(5, ("Testing Element Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -802,8 +802,8 @@ test_select_point(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_point() */
/****************************************************************
@@ -864,10 +864,10 @@ test_select_all(hid_t xfer_plist)
MESSAGE(5, ("Testing 'All' Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE4_DIM1; i++)
@@ -917,8 +917,8 @@ test_select_all(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_all() */
/****************************************************************
@@ -951,10 +951,10 @@ test_select_all_hyper(hid_t xfer_plist)
MESSAGE(5, ("Testing 'All' Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -1069,8 +1069,8 @@ test_select_all_hyper(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_all_hyper() */
/****************************************************************
@@ -1105,10 +1105,10 @@ test_select_combo(void)
MESSAGE(5, ("Testing Combination of Hyperslab & Element Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -1230,8 +1230,8 @@ test_select_combo(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_combo() */
static int
@@ -1300,10 +1300,10 @@ test_select_hyper_stride(hid_t xfer_plist)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -1415,8 +1415,8 @@ test_select_hyper_stride(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_stride() */
/****************************************************************
@@ -1446,10 +1446,10 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
MESSAGE(5, ("Testing Contiguous Hyperslabs Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -1557,8 +1557,8 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_contig() */
/****************************************************************
@@ -1586,11 +1586,11 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
MESSAGE(5, ("Testing More Contiguous Hyperslabs Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t),
- (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf =
+ (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE8_DIM1; i++)
@@ -1700,8 +1700,8 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_contig2() */
/****************************************************************
@@ -1732,11 +1732,11 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
MESSAGE(5, ("Testing Yet More Contiguous Hyperslabs Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t),
- (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf =
+ (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE8_DIM4; i++)
@@ -1865,8 +1865,8 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_contig3() */
#if 0
@@ -2005,10 +2005,10 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
block_ptr = &(block[SS_DR_MAX_RANK - large_rank]);
/* Allocate buffers */
- small_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), small_cube_size);
- CHECK_PTR(small_cube_buf_1, "HDcalloc");
- large_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), large_cube_size);
- CHECK_PTR(large_cube_buf_1, "HDcalloc");
+ small_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), small_cube_size);
+ CHECK_PTR(small_cube_buf_1, "calloc");
+ large_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), large_cube_size);
+ CHECK_PTR(large_cube_buf_1, "calloc");
/* Create a dataset transfer property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -2493,8 +2493,8 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(small_cube_buf_1);
- HDfree(large_cube_buf_1);
+ free(small_cube_buf_1);
+ free(large_cube_buf_1);
} /* test_select_hyper_contig_dr__run_test() */
#endif
@@ -2533,8 +2533,8 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
max_cube_size *= (size_t)edge_size;
/* Allocate cube buffer for writing values */
- cube_buf = (uint16_t *)HDmalloc(sizeof(uint16_t) * max_cube_size);
- CHECK_PTR(cube_buf, "HDmalloc");
+ cube_buf = (uint16_t *)malloc(sizeof(uint16_t) * max_cube_size);
+ CHECK_PTR(cube_buf, "malloc");
/* Initialize the cube buffer */
cube_ptr = cube_buf;
@@ -2542,8 +2542,8 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
*cube_ptr++ = (uint16_t)s;
/* Allocate cube buffer for zeroing values on disk */
- zero_buf = (uint16_t *)HDcalloc(sizeof(uint16_t), max_cube_size);
- CHECK_PTR(zero_buf, "HDcalloc");
+ zero_buf = (uint16_t *)calloc(sizeof(uint16_t), max_cube_size);
+ CHECK_PTR(zero_buf, "calloc");
for (large_rank = 1; large_rank <= max_rank; large_rank++) {
for (small_rank = 1; small_rank < large_rank; small_rank++) {
@@ -2559,8 +2559,8 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
} /* for loop on small rank */
} /* for loop on large rank */
- HDfree(cube_buf);
- HDfree(zero_buf);
+ free(cube_buf);
+ free(zero_buf);
} /* test_select_hyper_contig_dr() */
#endif
@@ -2996,10 +2996,10 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
assert(large_cube_size < (size_t)(64 * 1024));
/* Allocate & initialize buffers */
- small_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), small_cube_size);
- CHECK_PTR(small_cube_buf_1, "HDcalloc");
- large_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), large_cube_size);
- CHECK_PTR(large_cube_buf_1, "HDcalloc");
+ small_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), small_cube_size);
+ CHECK_PTR(small_cube_buf_1, "calloc");
+ large_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), large_cube_size);
+ CHECK_PTR(large_cube_buf_1, "calloc");
/* Create a dataset transfer property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -3571,8 +3571,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(small_cube_buf_1);
- HDfree(large_cube_buf_1);
+ free(small_cube_buf_1);
+ free(large_cube_buf_1);
} /* test_select_hyper_checker_board_dr__run_test() */
#endif
@@ -3615,8 +3615,8 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
max_cube_size *= (size_t)(edge_size + 1);
/* Allocate cube buffer for writing values */
- cube_buf = (uint16_t *)HDmalloc(sizeof(uint16_t) * max_cube_size);
- CHECK_PTR(cube_buf, "HDmalloc");
+ cube_buf = (uint16_t *)malloc(sizeof(uint16_t) * max_cube_size);
+ CHECK_PTR(cube_buf, "malloc");
/* Initialize the cube buffer */
cube_ptr = cube_buf;
@@ -3624,8 +3624,8 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
*cube_ptr++ = (uint16_t)s;
/* Allocate cube buffer for zeroing values on disk */
- zero_buf = (uint16_t *)HDcalloc(sizeof(uint16_t), max_cube_size);
- CHECK_PTR(zero_buf, "HDcalloc");
+ zero_buf = (uint16_t *)calloc(sizeof(uint16_t), max_cube_size);
+ CHECK_PTR(zero_buf, "calloc");
for (large_rank = 1; large_rank <= max_rank; large_rank++) {
for (small_rank = 1; small_rank < large_rank; small_rank++) {
@@ -3653,8 +3653,8 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
} /* for loop on small rank */
} /* for loop on large rank */
- HDfree(cube_buf);
- HDfree(zero_buf);
+ free(cube_buf);
+ free(zero_buf);
} /* test_select_hyper_checker_board_dr() */
#endif
@@ -3688,12 +3688,12 @@ test_select_hyper_copy(void)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
- rbuf2 = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf2, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
+ rbuf2 = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf2, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -3825,9 +3825,9 @@ test_select_hyper_copy(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(rbuf2);
+ free(wbuf);
+ free(rbuf);
+ free(rbuf2);
} /* test_select_hyper_copy() */
/****************************************************************
@@ -3859,12 +3859,12 @@ test_select_point_copy(void)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
- wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
- rbuf2 = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf2, "HDcalloc");
+ wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
+ rbuf2 = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf2, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -4038,9 +4038,9 @@ test_select_point_copy(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(rbuf2);
+ free(wbuf);
+ free(rbuf);
+ free(rbuf2);
} /* test_select_point_copy() */
/****************************************************************
@@ -4077,10 +4077,10 @@ test_select_hyper_offset(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with Offsets\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -4226,8 +4226,8 @@ test_select_hyper_offset(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_offset() */
/****************************************************************
@@ -4259,10 +4259,10 @@ test_select_hyper_offset2(void)
MESSAGE(5, ("Testing More Hyperslab Selection Functions with Offsets\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE7_DIM1 * SPACE7_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE7_DIM1 * SPACE7_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE7_DIM1; i++)
@@ -4353,8 +4353,8 @@ test_select_hyper_offset2(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_offset2() */
/****************************************************************
@@ -4389,10 +4389,10 @@ test_select_point_offset(void)
MESSAGE(5, ("Testing Element Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -4573,8 +4573,8 @@ test_select_point_offset(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_point_offset() */
/****************************************************************
@@ -4616,10 +4616,10 @@ test_select_hyper_union(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -5199,8 +5199,8 @@ test_select_hyper_union(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_union() */
/****************************************************************
@@ -5394,10 +5394,10 @@ test_select_hyper_union_3d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of 3-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE3_DIM1 * SPACE3_DIM2);
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE3_DIM1 * SPACE3_DIM2);
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE4_DIM1; i++)
@@ -5538,8 +5538,8 @@ test_select_hyper_union_3d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_union_3d() */
/****************************************************************
@@ -5718,10 +5718,10 @@ test_select_hyper_and_2d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with intersection of 2-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -5823,8 +5823,8 @@ test_select_hyper_and_2d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_and_2d() */
/****************************************************************
@@ -5857,10 +5857,10 @@ test_select_hyper_xor_2d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with XOR of 2-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -5964,8 +5964,8 @@ test_select_hyper_xor_2d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_xor_2d() */
/****************************************************************
@@ -5998,10 +5998,10 @@ test_select_hyper_notb_2d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with NOTB of 2-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -6103,8 +6103,8 @@ test_select_hyper_notb_2d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_notb_2d() */
/****************************************************************
@@ -6137,10 +6137,10 @@ test_select_hyper_nota_2d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with NOTA of 2-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++)
@@ -6243,8 +6243,8 @@ test_select_hyper_nota_2d(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_nota_2d() */
/****************************************************************
@@ -6308,11 +6308,11 @@ test_select_hyper_union_random_5d(hid_t read_plist)
MESSAGE(5, ("Testing Hyperslab Selection Functions with random unions of 5-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf = (int *)HDmalloc(sizeof(int) * SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (int *)HDcalloc(sizeof(int),
- (size_t)(SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5));
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (int *)malloc(sizeof(int) * SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (int *)calloc(sizeof(int),
+ (size_t)(SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5));
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE5_DIM1; i++)
@@ -6421,8 +6421,8 @@ test_select_hyper_union_random_5d(hid_t read_plist)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_union_random_5d() */
/****************************************************************
@@ -6463,10 +6463,10 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
MESSAGE(5, ("Testing Hyperslab I/O on Large Chunks\n"));
/* Allocate the transfer buffers */
- data = (short *)HDmalloc(sizeof(short) * X * Y * Z);
- CHECK_PTR(data, "HDmalloc");
- data_out = (short *)HDcalloc((size_t)(NX * NY * NZ), sizeof(short));
- CHECK_PTR(data_out, "HDcalloc");
+ data = (short *)malloc(sizeof(short) * X * Y * Z);
+ CHECK_PTR(data, "malloc");
+ data_out = (short *)calloc((size_t)(NX * NY * NZ), sizeof(short));
+ CHECK_PTR(data_out, "calloc");
/*
* Data buffer initialization.
@@ -6647,8 +6647,8 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
CHECK(status, FAIL, "H5Sclose");
status = H5Fclose(file);
CHECK(status, FAIL, "H5Fclose");
- HDfree(data);
- HDfree(data_out);
+ free(data);
+ free(data_out);
} /* test_select_hyper_chunk() */
/****************************************************************
@@ -6689,10 +6689,10 @@ test_select_point_chunk(void)
MESSAGE(5, ("Testing Point Selections on Chunked Datasets\n"));
/* Allocate the transfer buffers */
- data = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(data, "HDmalloc");
- data_out = (unsigned *)HDcalloc((size_t)(SPACE7_DIM1 * SPACE7_DIM2), sizeof(unsigned));
- CHECK_PTR(data_out, "HDcalloc");
+ data = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(data, "malloc");
+ data_out = (unsigned *)calloc((size_t)(SPACE7_DIM1 * SPACE7_DIM2), sizeof(unsigned));
+ CHECK_PTR(data_out, "calloc");
/*
* Data buffer initialization.
@@ -6845,8 +6845,8 @@ test_select_point_chunk(void)
ret = H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(data);
- HDfree(data_out);
+ free(data);
+ free(data_out);
} /* test_select_point_chunk() */
/****************************************************************
@@ -7468,8 +7468,8 @@ test_select_fill_all(void)
MESSAGE(5, ("Testing Filling 'all' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7516,7 +7516,7 @@ test_select_fill_all(void)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_all() */
/****************************************************************
@@ -7544,8 +7544,8 @@ test_select_fill_point(hssize_t *offset)
MESSAGE(5, ("Testing Filling 'point' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7614,7 +7614,7 @@ test_select_fill_point(hssize_t *offset)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_point() */
/****************************************************************
@@ -7644,8 +7644,8 @@ test_select_fill_hyper_simple(hssize_t *offset)
MESSAGE(5, ("Testing Filling Simple 'hyperslab' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7720,7 +7720,7 @@ test_select_fill_hyper_simple(hssize_t *offset)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_hyper_simple() */
/****************************************************************
@@ -7755,8 +7755,8 @@ test_select_fill_hyper_regular(hssize_t *offset)
MESSAGE(5, ("Testing Filling Regular 'hyperslab' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7833,7 +7833,7 @@ test_select_fill_hyper_regular(hssize_t *offset)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_hyper_regular() */
/****************************************************************
@@ -7875,8 +7875,8 @@ test_select_fill_hyper_irregular(hssize_t *offset)
MESSAGE(5, ("Testing Filling Irregular 'hyperslab' Selections\n"));
/* Allocate memory buffer */
- wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
+ wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
/* Initialize memory buffer */
for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7957,7 +7957,7 @@ test_select_fill_hyper_irregular(hssize_t *offset)
CHECK(ret, FAIL, "H5Sclose");
/* Free memory buffers */
- HDfree(wbuf);
+ free(wbuf);
} /* test_select_fill_hyper_irregular() */
/****************************************************************
@@ -7984,10 +7984,10 @@ test_select_none(void)
MESSAGE(5, ("Testing I/O on 0-sized Selections\n"));
/* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(rbuf, "calloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE7_DIM1; i++)
@@ -8054,8 +8054,8 @@ test_select_none(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_none() */
/****************************************************************
@@ -8087,10 +8087,10 @@ test_scalar_select(void)
MESSAGE(5, ("Testing I/O on Selections in Scalar Dataspaces\n"));
/* Allocate write & read buffers */
- wbuf_uint8 = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf_uint8, "HDmalloc");
- wbuf_ushort = (unsigned short *)HDmalloc(sizeof(unsigned short) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK_PTR(wbuf_ushort, "HDmalloc");
+ wbuf_uint8 = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf_uint8, "malloc");
+ wbuf_ushort = (unsigned short *)malloc(sizeof(unsigned short) * SPACE7_DIM1 * SPACE7_DIM2);
+ CHECK_PTR(wbuf_ushort, "malloc");
/* Initialize write buffers */
for (i = 0, tbuf_uint8 = wbuf_uint8, tbuf_ushort = wbuf_ushort; i < SPACE7_DIM1; i++)
@@ -8213,8 +8213,8 @@ test_scalar_select(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free memory buffers */
- HDfree(wbuf_uint8);
- HDfree(wbuf_ushort);
+ free(wbuf_uint8);
+ free(wbuf_ushort);
} /* test_scalar_select() */
/****************************************************************
@@ -13592,10 +13592,10 @@ test_select_hyper_chunk_offset(void)
MESSAGE(6, ("Testing hyperslab selections using offsets in chunked datasets\n"));
/* Allocate buffers */
- wbuf = (int *)HDmalloc(sizeof(int) * SPACE10_DIM1);
- CHECK_PTR(wbuf, "HDmalloc");
- rbuf = (int *)HDcalloc(sizeof(int), SPACE10_DIM1);
- CHECK_PTR(rbuf, "HDcalloc");
+ wbuf = (int *)malloc(sizeof(int) * SPACE10_DIM1);
+ CHECK_PTR(wbuf, "malloc");
+ rbuf = (int *)calloc(sizeof(int), SPACE10_DIM1);
+ CHECK_PTR(rbuf, "calloc");
/* Initialize the write buffer */
for (i = 0; i < SPACE10_DIM1; i++)
@@ -13775,8 +13775,8 @@ test_select_hyper_chunk_offset(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free the buffers */
- HDfree(wbuf);
- HDfree(rbuf);
+ free(wbuf);
+ free(rbuf);
} /* test_select_hyper_chunk_offset() */
#endif
/****************************************************************
diff --git a/test/API/tvlstr.c b/test/API/tvlstr.c
index 35d5358..427ae7b 100644
--- a/test/API/tvlstr.c
+++ b/test/API/tvlstr.c
@@ -64,7 +64,7 @@ test_vlstr_alloc_custom(size_t size, void *info)
*/
extra = MAX(sizeof(void *), sizeof(size_t));
- if ((ret_value = HDmalloc(extra + size)) != NULL) {
+ if ((ret_value = malloc(extra + size)) != NULL) {
*(size_t *)ret_value = size;
*mem_used += size;
} /* end if */
@@ -96,7 +96,7 @@ test_vlstr_free_custom(void *_mem, void *info)
if (_mem != NULL) {
mem = ((unsigned char *)_mem) - extra;
*mem_used -= *(size_t *)((void *)mem);
- HDfree(mem);
+ free(mem);
} /* end if */
}
@@ -162,7 +162,7 @@ test_vlstrings_basic(void)
dataset2 = H5Dcreate2(fid1, "Dataset2", tid1, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
- wdata2 = (char *)HDcalloc((size_t)65534, sizeof(char));
+ wdata2 = (char *)calloc((size_t)65534, sizeof(char));
HDmemset(wdata2, 'A', (size_t)65533);
ret = H5Dwrite(dataset2, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, &wdata2);
@@ -170,7 +170,7 @@ test_vlstrings_basic(void)
H5Sclose(dataspace);
H5Dclose(dataset2);
- HDfree(wdata2);
+ free(wdata2);
/* Change to the custom memory allocation routines for reading VL string */
xfer_pid = H5Pcreate(H5P_DATASET_XFER);
@@ -625,7 +625,7 @@ test_write_vl_string_attribute(void)
att = H5Acreate2(root, "test_scalar_large", type, dataspace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(att, FAIL, "H5Acreate2");
- string_att_write = (char *)HDcalloc((size_t)8192, sizeof(char));
+ string_att_write = (char *)calloc((size_t)8192, sizeof(char));
HDmemset(string_att_write, 'A', (size_t)8191);
ret = H5Awrite(att, type, &string_att_write);
@@ -642,7 +642,7 @@ test_write_vl_string_attribute(void)
string_att_check = NULL;
/* The attribute string written is freed below, in the test_read_vl_string_attribute() test */
- /* HDfree(string_att_write); */
+ /* free(string_att_write); */
ret = H5Aclose(att);
CHECK(ret, FAIL, "HAclose");
@@ -723,7 +723,7 @@ test_read_vl_string_attribute(void)
/* Free string allocated in test_write_vl_string_attribute */
if (string_att_write)
- HDfree(string_att_write);
+ free(string_att_write);
ret = H5Aclose(att);
CHECK(ret, FAIL, "HAclose");
diff --git a/test/API/tvltypes.c b/test/API/tvltypes.c
index a17589b..30063e0 100644
--- a/test/API/tvltypes.c
+++ b/test/API/tvltypes.c
@@ -63,7 +63,7 @@ test_vltypes_alloc_custom(size_t size, void *mem_used)
* DEC Alpha to keep the alignment correct - QAK)
*/
- if ((ret_value = HDmalloc(extra + size)) != NULL) {
+ if ((ret_value = malloc(extra + size)) != NULL) {
*(size_t *)ret_value = size;
*(size_t *)mem_used += size;
} /* end if */
@@ -93,7 +93,7 @@ test_vltypes_free_custom(void *_mem, void *mem_used)
unsigned char *mem = ((unsigned char *)_mem) - extra; /* Pointer to actual block allocated */
*(size_t *)mem_used -= *(size_t *)((void *)mem);
- HDfree(mem);
+ free(mem);
} /* end if */
}
@@ -257,7 +257,7 @@ test_vltypes_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(unsigned int));
+ wdata[i].p = malloc((i + 1) * sizeof(unsigned int));
wdata[i].len = i + 1;
for (j = 0; j < (i + 1); j++)
((unsigned int *)wdata[i].p)[j] = i * 10 + j;
@@ -588,7 +588,7 @@ rewrite_vltypes_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + increment) * sizeof(unsigned int));
+ wdata[i].p = malloc((i + increment) * sizeof(unsigned int));
wdata[i].len = i + increment;
for (j = 0; j < (i + increment); j++)
((unsigned int *)wdata[i].p)[j] = i * 20 + j;
@@ -750,7 +750,7 @@ test_vltypes_vlen_compound(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(s1));
+ wdata[i].p = malloc((i + 1) * sizeof(s1));
wdata[i].len = i + 1;
for (j = 0; j < (i + 1); j++) {
((s1 *)wdata[i].p)[j].i = (int)(i * 10 + j);
@@ -902,7 +902,7 @@ rewrite_vltypes_vlen_compound(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + increment) * sizeof(s1));
+ wdata[i].p = malloc((i + increment) * sizeof(s1));
wdata[i].len = i + increment;
for (j = 0; j < (i + increment); j++) {
((s1 *)wdata[i].p)[j].i = (int)(i * 40 + j);
@@ -1051,17 +1051,17 @@ test_vltypes_compound_vlen_vlen(void)
MESSAGE(5, ("Testing Compound Datatypes with VL Atomic Datatype Component Functionality\n"));
/* Allocate and initialize VL data to write */
- wdata = (s1 *)HDmalloc(sizeof(s1) * SPACE3_DIM1);
- CHECK_PTR(wdata, "HDmalloc");
- rdata = (s1 *)HDmalloc(sizeof(s1) * SPACE3_DIM1);
- CHECK_PTR(rdata, "HDmalloc");
+ wdata = (s1 *)malloc(sizeof(s1) * SPACE3_DIM1);
+ CHECK_PTR(wdata, "malloc");
+ rdata = (s1 *)malloc(sizeof(s1) * SPACE3_DIM1);
+ CHECK_PTR(rdata, "malloc");
for (i = 0; i < SPACE3_DIM1; i++) {
wdata[i].i = (int)(i * 10);
wdata[i].f = (float)(i * 20) / 3.0F;
- wdata[i].v.p = HDmalloc((i + L1_INCM) * sizeof(hvl_t));
+ wdata[i].v.p = malloc((i + L1_INCM) * sizeof(hvl_t));
wdata[i].v.len = i + L1_INCM;
for (t1 = (hvl_t *)((wdata[i].v).p), j = 0; j < (i + L1_INCM); j++, t1++) {
- t1->p = HDmalloc((j + L2_INCM) * sizeof(unsigned int));
+ t1->p = malloc((j + L2_INCM) * sizeof(unsigned int));
t1->len = j + L2_INCM;
for (k = 0; k < j + L2_INCM; k++)
((unsigned int *)t1->p)[k] = i * 100 + j * 10 + k;
@@ -1193,8 +1193,8 @@ test_vltypes_compound_vlen_vlen(void)
CHECK(ret, FAIL, "H5Fclose");
/* Release buffers */
- HDfree(wdata);
- HDfree(rdata);
+ free(wdata);
+ free(rdata);
} /* end test_vltypes_compound_vlen_vlen() */
/****************************************************************
@@ -1241,11 +1241,11 @@ test_vltypes_compound_vlstr(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].v.p = (s2 *)HDmalloc((i + L3_INCM) * sizeof(s2));
+ wdata[i].v.p = (s2 *)malloc((i + L3_INCM) * sizeof(s2));
wdata[i].v.len = i + L3_INCM;
for (t1 = (s2 *)((wdata[i].v).p), j = 0; j < (i + L3_INCM); j++, t1++) {
HDstrcat(str, "m");
- t1->string = (char *)HDmalloc(HDstrlen(str) * sizeof(char) + 1);
+ t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
HDstrcpy(t1->string, str);
/*t1->color = red;*/
t1->color = blue;
@@ -1411,11 +1411,11 @@ test_vltypes_compound_vlstr(void)
/* Use this part for new data */
HDstrcpy(str, "bbbbbbbb\0");
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata2[i].v.p = (s2 *)HDmalloc((i + 1) * sizeof(s2));
+ wdata2[i].v.p = (s2 *)malloc((i + 1) * sizeof(s2));
wdata2[i].v.len = i + 1;
for (t1 = (s2 *)(wdata2[i].v).p, j = 0; j < i + 1; j++, t1++) {
HDstrcat(str, "pp");
- t1->string = (char *)HDmalloc(HDstrlen(str) * sizeof(char) + 1);
+ t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
HDstrcpy(t1->string, str);
t1->color = green;
}
@@ -1529,7 +1529,7 @@ test_vltypes_compound_vlen_atomic(void)
for (i = 0; i < SPACE1_DIM1; i++) {
wdata[i].i = (int)(i * 10);
wdata[i].f = (float)(i * 20) / 3.0F;
- wdata[i].v.p = HDmalloc((i + 1) * sizeof(unsigned int));
+ wdata[i].v.p = malloc((i + 1) * sizeof(unsigned int));
wdata[i].v.len = i + 1;
for (j = 0; j < (i + 1); j++)
((unsigned int *)wdata[i].v.p)[j] = i * 10 + j;
@@ -1763,7 +1763,7 @@ rewrite_vltypes_compound_vlen_atomic(void)
for (i = 0; i < SPACE1_DIM1; i++) {
wdata[i].i = (int)(i * 40);
wdata[i].f = (float)(i * 50) / 3.0F;
- wdata[i].v.p = HDmalloc((i + increment) * sizeof(unsigned int));
+ wdata[i].v.p = malloc((i + increment) * sizeof(unsigned int));
wdata[i].v.len = i + increment;
for (j = 0; j < (i + increment); j++)
((unsigned int *)wdata[i].v.p)[j] = i * 60 + j;
@@ -1937,14 +1937,14 @@ test_vltypes_vlen_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + 1) * sizeof(hvl_t));
+ wdata[i].p = malloc((i + 1) * sizeof(hvl_t));
if (wdata[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
return;
} /* end if */
wdata[i].len = i + 1;
for (t1 = (hvl_t *)(wdata[i].p), j = 0; j < (i + 1); j++, t1++) {
- t1->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ t1->p = malloc((j + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
return;
@@ -2138,14 +2138,14 @@ rewrite_longer_vltypes_vlen_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + increment) * sizeof(hvl_t));
+ wdata[i].p = malloc((i + increment) * sizeof(hvl_t));
if (wdata[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
return;
} /* end if */
wdata[i].len = i + increment;
for (t1 = (hvl_t *)(wdata[i].p), j = 0; j < (i + increment); j++, t1++) {
- t1->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ t1->p = malloc((j + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
return;
@@ -2318,14 +2318,14 @@ rewrite_shorter_vltypes_vlen_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for (i = 0; i < SPACE1_DIM1; i++) {
- wdata[i].p = HDmalloc((i + increment) * sizeof(hvl_t));
+ wdata[i].p = malloc((i + increment) * sizeof(hvl_t));
if (wdata[i].p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i);
return;
} /* end if */
wdata[i].len = i + increment;
for (t1 = (hvl_t *)(wdata[i].p), j = 0; j < (i + increment); j++, t1++) {
- t1->p = HDmalloc((j + 1) * sizeof(unsigned int));
+ t1->p = malloc((j + 1) * sizeof(unsigned int));
if (t1->p == NULL) {
TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j);
return;
@@ -2594,8 +2594,8 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Tclose");
/* Allocate space for the buffer to read data */
- rbuf = (dtype1_struct *)HDmalloc(SPACE4_DIM_LARGE * sizeof(dtype1_struct));
- CHECK_PTR(rbuf, "HDmalloc");
+ rbuf = (dtype1_struct *)malloc(SPACE4_DIM_LARGE * sizeof(dtype1_struct));
+ CHECK_PTR(rbuf, "malloc");
/* Create the small & large dataspaces to use */
small_dspace_id = H5Screate_simple(SPACE4_RANK, small_dims, NULL);
@@ -3215,7 +3215,7 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Tclose");
/* Release buffer */
- HDfree(rbuf);
+ free(rbuf);
} /* end test_vltypes_fill_value() */
/****************************************************************