5 /* The original test driver machinery. */
6 #define N_TEST_TRANSACTIONS 500
7 #define N_TEST_ARR 2000
9 #define M_TEST_MALLOC 1000
11 void* test_arr
[N_TEST_ARR
];
13 int main ( int argc
, char** argv
)
18 for (i
= 0; i
< N_TEST_ARR
; i
++)
21 for (i
= 0; i
< N_TEST_TRANSACTIONS
; i
++) {
22 j
= random() % N_TEST_ARR
;
27 nbytes
= 1 + random() % M_TEST_MALLOC
;
28 if (random()%64 == 32)
30 test_arr
[j
] = malloc( nbytes
);
32 for (k
= 1; k
< nbytes
; k
++)
33 chp
[k
] = (unsigned char)(k
+ 99);
37 for (i
= 0; test_arr
[i
] == NULL
; i
++) ;
39 ((char*)test_arr
[i
])[0] = 0;
41 for (i
= 0; i
< N_TEST_ARR
; i
++) {