Simulating memory accesses (Adi)
6 Mar 2004 13:46:49 -0500

          From comp.compilers

Related articles
Simulating memory accesses (2004-03-06)
Re: Simulating memory accesses (2004-03-11)
Re: Simulating memory accesses (2004-03-11)
| List of all articles for this month |

From: (Adi)
Newsgroups: comp.compilers
Date: 6 Mar 2004 13:46:49 -0500
Keywords: architecture, question
Posted-Date: 06 Mar 2004 13:46:49 EST


I am writing a code which mimicks the memory accesses of an
application. Lets assume that array a[] contains all the addresses
accessed in sequence, check the for loop in the code given below. Now,
i want to mimick these accesses(not absolutely but atleast
relatively). I could see only one solution to that - writing a for
loop(see the code). But it gives extra memory accesses, accesing
address of index i and a[i] along with the to b mimicked accesses.

                int a[300]; //stores the addresses
                char x[5000]; //character array to mimick the memory accesses
                int i;

                a[0] = 0;
                                a[i] = a[i-1]+16; //storing the addresses in the

                x[0] = 0;
                                x[a[i]]='0'; //mimick the realtive memory

Is there any other solution to bypass these unwanted accesses like
storing value of i in registers etc... ?


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.