#include #include #include #define N_PTRS 1000 #define N_ALLOCS 10000 #define MAX_SIZE 0x10000 #define random_size() (random()%MAX_SIZE) #define random_ptr() (random()%N_PTRS) void test1(void); void test2(void); int main(int argc,char *argv[]) { test1(); test2(); } void test1(void) { void **ptrs; int i,j; int size; srandom(0x19730929); ptrs = malloc(N_PTRS*sizeof(void *)); for(i=0;i