diff options
| -rw-r--r-- | testn.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,14 +1,19 @@ #include <stdio.h> #include <stdlib.h> #include <time.h> +// 256 bytes = 4 * 64 = 4 * cachelines +// with 4-way associative cache one row +// traverse each set. +// With 8-way associative cache the col number +// should be doubled. +#define COLS 256 #define ROWS 1024 -#define COLS 64 #define VFL 6291456 #ifndef OFF #define OFF 0 #endif -char arr[ROWS*4][(COLS+OFF)*4] __attribute__((aligned(4096))); +char arr[ROWS][COLS+OFF*4] __attribute__((aligned(4096))); char arr2[VFL]; int main() { |
