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