Instead the compiler allocates space in data or bss

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: lowing definitions: 1 2 3 4 5 6 7 8 9 struct point_color { int c; int m; int y; int k; }; struct point_color square[16][16]; int i, j; Assume: ¯ ¯ ¯ ¯ sizeof(int) == 4. square begins at memory address 0. The cache is initially empty. The only memory accesses are to the entries of the array square. Variables i and j are stored in registers. Determine the cache performance of the following code: 1 2 3 4 5 6 7 8 for (i = 0; i < 16; i++){ for (j = 0; j < 16; j++) { square[i][j].c = 0; square[i][j].m = 0; square[i][j].y = 1; square[i][j].k = 0; } } A. What is the total number of writes? _______. B. What is the total number of writes that miss in the cache? _______ . C. What is the miss rate? _______. Homework Problem 6.26 [Category 1]: Given the assumptions in Problem 6.25, determine the cache performance of the following code: 342 1 2 3 4 5 6 7 8 CHAPTER 6. THE MEMORY HIERARCHY for (i = 0; i < 16; i++){ for (j = 0; j < 16; j++) { square[j][i].c = 0; square[j][i].m = 0; square[j][i].y = 1; square[j][...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online