his C code is not running which is related to cache memoryoperations…….Please find the bugs here
/********************************
* 1. Includes *
********************************/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <ctype.h>
struct Block_ {
int valid;
char* tag;
int dirty;
};
struct Cache_ {
int hits;
int misses;
int reads;
int writes;
int cache_size;
int block_size;
int numLines;
Block* blocks;
};
calculates the corresponding tag, index, and offset.
*
* @param binary memory address
*
* @return void
void parseMemoryAddress(char *address)
{
unsigned int dec;
char *bstring, *bformatted, *tag, *index, *offset;
int i;
bformatted = address;
i = 0;
tag = (char *) malloc( sizeof(char) * (TAG + 1) );
assert(tag != NULL);
tag[TAG] = ‘ ‘;
for(i = 0; i < TAG; i++)
{
tag[i] = bformatted[i];
}
index = (char *) malloc( sizeof(char) * (INDEX + 1) );
assert(index != NULL);
index[INDEX]
PayPal Gateway not configured
PayPal Gateway not configured