#define PAGE 4096 #define SIZE 2047*PAGE #define CYCLES 5000000 #define DECR_INTVL_PGS 23 #define DECR_INTVL_BYTES DECR_INTVL_PGS*PAGE main() { int ad, offset, j, cycles; int *ptr; ad=malloc(SIZE); if (ad==0) { printf("Malloc fails\n"); return(0); } offset=SIZE-PAGE; for (cycles=0; cycles<=CYCLES; cycles++) { /*printf("Offset = %x\n", offset);*/ ptr=ad+offset; j = *ptr; offset=offset-DECR_INTVL_BYTES; if (offset<0) offset=SIZE-PAGE+offset; } printf("FINISHED\n"); }