@@ -32,10 +32,7 @@ using umf_test::test;
32
32
// Helpers
33
33
// ------------------------------------------------------------------------
34
34
35
- static inline size_t rand_alloc_size (int max) {
36
- srand (SRAND_INIT_VALUE);
37
- return rand () % max;
38
- }
35
+ static inline size_t rand_alloc_size (int max) { return rand () % max; }
39
36
40
37
static inline void free_memory (umf_memory_pool_handle_t hPool,
41
38
void *ptr[ITERATIONS]) {
@@ -50,6 +47,7 @@ static inline void free_memory(umf_memory_pool_handle_t hPool,
50
47
51
48
// ISO/IEC 9899:TC3 7.20.3.3
52
49
void malloc_compliance_test (umf_memory_pool_handle_t hPool) {
50
+ srand (SRAND_INIT_VALUE);
53
51
void *alloc_ptr[ITERATIONS];
54
52
size_t alloc_ptr_size[ITERATIONS];
55
53
@@ -80,6 +78,7 @@ void malloc_compliance_test(umf_memory_pool_handle_t hPool) {
80
78
81
79
// ISO/IEC 9899:TC3 7.20.3.1
82
80
void calloc_compliance_test (umf_memory_pool_handle_t hPool) {
81
+ srand (SRAND_INIT_VALUE);
83
82
void *alloc_ptr[ITERATIONS];
84
83
size_t alloc_size;
85
84
@@ -98,6 +97,7 @@ void calloc_compliance_test(umf_memory_pool_handle_t hPool) {
98
97
99
98
// ISO/IEC 9899:TC3 7.20.3.4
100
99
void realloc_compliance_test (umf_memory_pool_handle_t hPool) {
100
+ srand (SRAND_INIT_VALUE);
101
101
// If ptr is a null pointer, the realloc function behaves
102
102
// like the malloc function for the specified size
103
103
void *ret = umfPoolRealloc (hPool, NULL , 10 );
0 commit comments