3 Test program to do matrix multiplication on large arrays.
5 Intended to stress virtual memory system.
7 Ideally, we could read the matrices off of the file system,
8 and store the result back to the file system!
14 /* You should define DIM to be large enough that the arrays
15 don't fit in physical memory.
28 16,384 3,145,728 kB */
40 /* Initialize the matrices. */
41 for (i
= 0; i
< DIM
; i
++)
42 for (j
= 0; j
< DIM
; j
++)
49 /* Multiply matrices. */
50 for (i
= 0; i
< DIM
; i
++)
51 for (j
= 0; j
< DIM
; j
++)
52 for (k
= 0; k
< DIM
; k
++)
53 C
[i
][j
] += A
[i
][k
] * B
[k
][j
];
56 exit (C
[DIM
- 1][DIM
- 1]);