#include #include #include #define C const #define L1 3 #define L2 5 typedef long int L; typedef struct {L whn; char * what;} rp; L TB(void); L lr(){return (((L)random())<<29)^random();} int main(int C argc, char C * C * C args){ int C cl = L1*(L2+4); // How many time intervals rp a[cl+1]; int ax = 0; void RP(char * what){a[ax++] = (rp){TB(), what};} assert(sizeof(L) == 8); if(argc < 2) exit(printf("Gimme a power!\n")); int C p = atoi(args[1]); L C P = 1L< 49) exit(printf("No! I want the exponent of 2 !!\n")); if(!P) exit(printf("arg is bigger than size of int\n")); {int j = L1; while(j--) { RP("malloc"); char * ar = (char *)malloc(P); if(!ar) exit(printf("Too big! %d\n", p)); {int y=L2; while(y--){L C x = lr()&(P-1); RP("0 test"); if(ar[x]) exit(printf("NZ!! at %ld %ld\n", x, P)); if(!y) {RP("0 test rep addr"); if(ar[x]) exit(0);}}} RP("store in area"); ar[lr()&(P-1)] = 42; RP("free"); free(ar);}} RP("done"); assert(ax==cl+1); {int j; for(j=0; j