diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 22:48:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 22:48:12 (GMT) |
commit | aebac33a1f290fa5065bce96bb0512317a34c283 (patch) | |
tree | cdbae6dbd65a2eb4e6f786921ee907cec92c92d3 /test/timer.c | |
parent | 605cea4af60cfcbe03a54f697de392eec75e5a85 (diff) | |
download | hdf5-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/timer.c')
-rw-r--r-- | test/timer.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/test/timer.c b/test/timer.c index d271f41..7231534 100644 --- a/test/timer.c +++ b/test/timer.c @@ -43,62 +43,62 @@ test_time_formatting(void) s = H5_timer_get_time_string(-1.0); if (NULL == s || HDstrcmp(s, "N/A") != 0) TEST_ERROR; - HDfree(s); + free(s); /* 0 0 */ s = H5_timer_get_time_string(0.0); if (NULL == s || HDstrcmp(s, "0.0 s") != 0) TEST_ERROR; - HDfree(s); + free(s); /* < 1 us nanoseconds */ s = H5_timer_get_time_string(123.0E-9); if (NULL == s || HDstrcmp(s, "123 ns") != 0) TEST_ERROR; - HDfree(s); + free(s); /* < 1 ms microseconds */ s = H5_timer_get_time_string(23.456E-6); if (NULL == s || HDstrcmp(s, "23.5 us") != 0) TEST_ERROR; - HDfree(s); + free(s); /* < 1 s milliseconds */ s = H5_timer_get_time_string(4.56789E-3); if (NULL == s || HDstrcmp(s, "4.6 ms") != 0) TEST_ERROR; - HDfree(s); + free(s); /* < 1 min seconds */ s = H5_timer_get_time_string(3.14); if (NULL == s || HDstrcmp(s, "3.14 s") != 0) TEST_ERROR; - HDfree(s); + free(s); /* < 1 hr mins, secs */ s = H5_timer_get_time_string(2521.0); if (NULL == s || HDstrcmp(s, "42 m 1 s") != 0) TEST_ERROR; - HDfree(s); + free(s); /* < 1 d hrs, mins, secs */ s = H5_timer_get_time_string(9756.0); if (NULL == s || HDstrcmp(s, "2 h 42 m 36 s") != 0) TEST_ERROR; - HDfree(s); + free(s); /* > 1 d days, hrs, mins, secs */ s = H5_timer_get_time_string(280802.0); if (NULL == s || HDstrcmp(s, "3 d 6 h 0 m 2 s") != 0) TEST_ERROR; - HDfree(s); + free(s); PASSED(); return 0; error: if (s) - HDfree(s); + free(s); return -1; } @@ -149,8 +149,8 @@ test_timer_system_user(void) /* Do some fake work */ for (i = 0; i < 1024; i++) { - buf = (char *)HDmalloc(1024 * (size_t)i); - HDfree(buf); + buf = (char *)malloc(1024 * (size_t)i); + free(buf); } err = H5_timer_stop(&timer); @@ -208,8 +208,8 @@ test_timer_elapsed(void) /* Do some fake work */ for (i = 0; i < 1024; i++) { - buf = (char *)HDmalloc(1024 * (size_t)i); - HDfree(buf); + buf = (char *)malloc(1024 * (size_t)i); + free(buf); } err = H5_timer_stop(&timer); @@ -275,8 +275,8 @@ test_timer_functionality(void) /* Do some fake work */ for (i = 0; i < 1024; i++) { - buf = (char *)HDmalloc(1024 * (size_t)i); - HDfree(buf); + buf = (char *)malloc(1024 * (size_t)i); + free(buf); } /* Running state should change after stop */ @@ -317,8 +317,8 @@ test_timer_functionality(void) /* Do some fake work */ for (i = 0; i < 1024; i++) { - buf = (char *)HDmalloc(1024 * (size_t)i); - HDfree(buf); + buf = (char *)malloc(1024 * (size_t)i); + free(buf); } /* Times should be non-negative */ @@ -334,8 +334,8 @@ test_timer_functionality(void) /* Do some fake work */ for (i = 0; i < 1024; i++) { - buf = (char *)HDmalloc(1024 * (size_t)i); - HDfree(buf); + buf = (char *)malloc(1024 * (size_t)i); + free(buf); } /* State should flip on stop */ |